Class: TerraformDSL::AWS::EIP

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, ec2) ⇒ EIP

Returns a new instance of EIP.



287
288
289
290
# File 'lib/terraformdsl/aws.rb', line 287

def initialize(name, ec2)
  @name = name
  @ec2  = ec2
end

Instance Attribute Details

#ec2Object (readonly)

Returns the value of attribute ec2.



291
292
293
# File 'lib/terraformdsl/aws.rb', line 291

def ec2
  @ec2
end

#nameObject (readonly)

Returns the value of attribute name.



291
292
293
# File 'lib/terraformdsl/aws.rb', line 291

def name
  @name
end

Instance Method Details

#attr(attr) ⇒ Object



293
# File 'lib/terraformdsl/aws.rb', line 293

def attr(attr); "${aws_eip.#{@name}.#{attr}}"; end