Class: TerraformConfig::RequiredProvider

Inherits:
Base
  • Object
show all
Defined in:
lib/core/terraform_config/required_provider.rb

Constant Summary

Constants included from Dsl

Dsl::EXPRESSION_PATTERN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#importable?, #locals, #reference

Methods included from Dsl

#argument, #block

Constructor Details

#initialize(name:, org:, **options) ⇒ RequiredProvider

Returns a new instance of RequiredProvider.



7
8
9
10
11
12
13
# File 'lib/core/terraform_config/required_provider.rb', line 7

def initialize(name:, org:, **options)
  super()

  @name = name
  @org = org
  @options = options
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/core/terraform_config/required_provider.rb', line 5

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/core/terraform_config/required_provider.rb', line 5

def options
  @options
end

#orgObject (readonly)

Returns the value of attribute org.



5
6
7
# File 'lib/core/terraform_config/required_provider.rb', line 5

def org
  @org
end

Instance Method Details

#to_tfObject



15
16
17
18
19
20
21
# File 'lib/core/terraform_config/required_provider.rb', line 15

def to_tf
  block :terraform do
    block :required_providers do
      argument name, options
    end
  end
end