Class: TerraformDSL::AWS::AMI

Inherits:
Resource
  • Object
show all
Defined in:
lib/terraformdsl/aws.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#parent

Instance Method Summary collapse

Methods inherited from Resource

#accept, #set_parent

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

#nameObject (readonly)

Returns the value of attribute name.



120
121
122
# File 'lib/terraformdsl/aws.rb', line 120

def name
  @name
end

#ownersObject (readonly)

Returns the value of attribute owners.



120
121
122
# File 'lib/terraformdsl/aws.rb', line 120

def owners
  @owners
end

#patternObject (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