Class: Pangea::Resources::Base::ResourceDefinition
- Defined in:
- lib/pangea/resources/base.rb
Overview
Resource definition that gets passed to terraform-synthesizer
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, name, attributes) ⇒ ResourceDefinition
constructor
A new instance of ResourceDefinition.
-
#to_terraform_resource(&block) ⇒ Object
Convert to terraform-synthesizer resource block.
Constructor Details
#initialize(type, name, attributes) ⇒ ResourceDefinition
Returns a new instance of ResourceDefinition.
27 28 29 30 31 |
# File 'lib/pangea/resources/base.rb', line 27 def initialize(type, name, attributes) @type = type @name = name @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
25 26 27 |
# File 'lib/pangea/resources/base.rb', line 25 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/pangea/resources/base.rb', line 25 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
25 26 27 |
# File 'lib/pangea/resources/base.rb', line 25 def type @type end |
Instance Method Details
#to_terraform_resource(&block) ⇒ Object
Convert to terraform-synthesizer resource block
34 35 36 |
# File 'lib/pangea/resources/base.rb', line 34 def to_terraform_resource(&block) resource(type, name, &block) end |