Class: TerraformDSL::AWS::AMI
- Defined in:
- lib/terraformdsl/aws.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owners ⇒ Object
readonly
Returns the value of attribute owners.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Attributes inherited from Resource
Instance Method Summary collapse
- #attr(attr) ⇒ Object
-
#initialize(name, owners, pattern) ⇒ AMI
constructor
A new instance of AMI.
Methods inherited from Resource
Constructor Details
#initialize(name, owners, pattern) ⇒ AMI
Returns a new instance of AMI.
115 116 117 118 119 |
# File 'lib/terraformdsl/aws.rb', line 115 def initialize(name, owners, pattern) @name = name @owners = [owners].flatten() @pattern = pattern end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
120 121 122 |
# File 'lib/terraformdsl/aws.rb', line 120 def name @name end |
#owners ⇒ Object (readonly)
Returns the value of attribute owners.
120 121 122 |
# File 'lib/terraformdsl/aws.rb', line 120 def owners @owners end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
120 121 122 |
# File 'lib/terraformdsl/aws.rb', line 120 def pattern @pattern end |
Instance Method Details
#attr(attr) ⇒ Object
122 |
# File 'lib/terraformdsl/aws.rb', line 122 def attr(attr); "${data.aws_ami.#{@name}.#{attr}}"; end |