lib/convection/model/template.rb in convection-2.2.12 vs lib/convection/model/template.rb in convection-2.2.13
- old
+ new
@@ -39,9 +39,25 @@
def resource_collection_dsl_methods
@resource_collection_dsl_methods ||= {}
end
end
+
+ def _terraform_module_dir_to_flag(dir)
+ return 'root' if dir.empty?
+
+ parts = dir.split('/')
+ parts[0] = 'module' if parts[0] == 'modules'
+ parts.join('.')
+ end
+
+ def _terraform_module_flag_to_dir(flag)
+ return '' if flag == 'root'
+
+ parts = flag.split('.')
+ parts[0] = 'modules'
+ parts.join('/')
+ end
end
include DSL::Helpers
include DSL::Template::Resource