Class: TerraspaceBundler::Terrafile
- Inherits:
-
Object
- Object
- TerraspaceBundler::Terrafile
- Extended by:
- Memoist
- Includes:
- Singleton, TB::Util::Logging
- Defined in:
- lib/terraspace_bundler/terrafile.rb
Instance Method Summary collapse
-
#missing_org? ⇒ Boolean
Checks if any of the mods defined in Terrafile has an inferred an org In this case the org must be set When a source is set with an inferred org and org is not set it looks like this:.
-
#mods ⇒ Object
dsl meta example: :global=>{:org=>“boltopspro”, :mods=> [href=""eks"">args=>, :options=>{:source=>“terraform-aws-eks”}, href=""vpc"">args=>, :options=>{:source=>“terraform-aws-vpc”}]}.
- #new_mod(params) ⇒ Object
Instance Method Details
#missing_org? ⇒ Boolean
Checks if any of the mods defined in Terrafile has an inferred an org In this case the org must be set When a source is set with an inferred org and org is not set it looks like this:
dsl. has {:source=>"terraform-random-pet"}
mod.source = "terraform-random-pet"
Using info to detect that the org is missing and the Terrafile definition has at least one mod line that has an inferred org.
34 35 36 |
# File 'lib/terraspace_bundler/terrafile.rb', line 34 def missing_org? mods.detect { |mod| mod.source.split('/').size == 1 } && TB.config.org.nil? end |
#mods ⇒ Object
dsl meta example: :global=>{:org=>“boltopspro”, :mods=>
[{:args=>["eks"], :options=>{:source=>"terraform-aws-eks"}},
{:args=>["vpc"], :options=>{:source=>"terraform-aws-vpc"}}]}
12 13 14 15 16 |
# File 'lib/terraspace_bundler/terrafile.rb', line 12 def mods TB.dsl.[:mods].map do |params| new_mod(params) end end |