Class: Terraspace::Compiler::Builder
- Inherits:
-
Object
- Object
- Terraspace::Compiler::Builder
- Includes:
- Basename, CommandsConcern
- Defined in:
- lib/terraspace/compiler/builder.rb,
lib/terraspace/compiler/builder/skip.rb
Defined Under Namespace
Classes: Skip
Instance Method Summary collapse
- #build ⇒ Object
-
#build_config ⇒ Object
build common config files: provider and backend for the root module.
- #build_module ⇒ Object
- #build_tfvars ⇒ Object
-
#initialize(mod) ⇒ Builder
constructor
A new instance of Builder.
Methods included from Basename
Methods included from CommandsConcern
#command_is?, #requires_backend?, #requires_backend_commands
Constructor Details
#initialize(mod) ⇒ Builder
Returns a new instance of Builder.
6 7 8 |
# File 'lib/terraspace/compiler/builder.rb', line 6 def initialize(mod) @mod = mod end |
Instance Method Details
#build ⇒ Object
10 11 12 13 14 |
# File 'lib/terraspace/compiler/builder.rb', line 10 def build build_config build_module if @mod.resolved build_tfvars unless command_is?(:seed) # avoid dependencies being built and erroring when backend bucket doesnt exist end |
#build_config ⇒ Object
build common config files: provider and backend for the root module
17 18 19 20 |
# File 'lib/terraspace/compiler/builder.rb', line 17 def build_config return unless build? build_config_terraform end |
#build_module ⇒ Object
22 23 24 25 26 |
# File 'lib/terraspace/compiler/builder.rb', line 22 def build_module with_mod_file do |src_path| build_mod_file(src_path) end end |