lib/terraspace/compiler/perform.rb in terraspace-2.2.4 vs lib/terraspace/compiler/perform.rb in terraspace-2.2.5

- old
+ new

@@ -1,12 +1,13 @@ module Terraspace::Compiler class Perform include CommandsConcern include Basename - def initialize(mod) - @mod = mod + def initialize(mod, options={}) + # options for type_dir + @mod, @options = mod, options end def compile compile_config compile_module if @mod.resolved @@ -58,10 +59,10 @@ src_path ||= search("#{Terraspace.root}/config/terraform/#{file}").first compile_mod_file(src_path) if src_path end def compile_mod_file(src_path) - content = Strategy::Mod.new(@mod, src_path).run + content = Strategy::Mod.new(@mod, src_path, @options).run Writer.new(@mod, src_path: src_path).write(content) end def with_mod_file(&block) with_path("#{@mod.root}/**/*", &block) # Only all files