Class: TerraformDSL::AWS::Route

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(cidr, gateway: nil, ec2: nil, nat: nil, egress_only: nil, network_interface: nil) ⇒ Route

Returns a new instance of Route.



195
196
197
198
199
200
201
202
# File 'lib/terraformdsl/aws.rb', line 195

def initialize(cidr, gateway: nil, ec2: nil, nat: nil, egress_only: nil, network_interface: nil)
  @cidr    = cidr
  @gateway = gateway
  @ec2     = ec2
  @nat     = nat
  @egress_only = egress_only
  @network_interface = network_interface
end

Instance Attribute Details

#cidrObject (readonly)

Returns the value of attribute cidr.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def cidr
  @cidr
end

#ec2Object (readonly)

Returns the value of attribute ec2.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def ec2
  @ec2
end

#egress_onlyObject (readonly)

Returns the value of attribute egress_only.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def egress_only
  @egress_only
end

#gatewayObject (readonly)

Returns the value of attribute gateway.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def gateway
  @gateway
end

#natObject (readonly)

Returns the value of attribute nat.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def nat
  @nat
end

#network_interfaceObject (readonly)

Returns the value of attribute network_interface.



203
204
205
# File 'lib/terraformdsl/aws.rb', line 203

def network_interface
  @network_interface
end

Instance Method Details

#attr(attr) ⇒ Object



205
206
207
208
# File 'lib/terraformdsl/aws.rb', line 205

def attr(attr)
  @name  or raise "#{self.class.name}#attr() is not available without name."
  "${aws_route_table.#{@name}.#{attr}}"
end