Class: TerraformDSL::AWS::Egress

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

Constant Summary collapse

PROTOCOLS =
[:tcp, :udp, :icmp, :any]

Instance Attribute Summary collapse

Attributes inherited from Resource

#parent

Instance Method Summary collapse

Methods inherited from Resource

#accept, #attr, #set_parent

Constructor Details

#initialize(protocol, port, destination) ⇒ Egress

Returns a new instance of Egress.



249
250
251
252
253
254
255
# File 'lib/terraformdsl/aws.rb', line 249

def initialize(protocol, port, destination)
  PROTOCOLS.include?(protocol)  or
    raise ArgumentError.new("#{protocol.inspect}: unknown protocol for Egress.")
  @protocol    = protocol
  @port        = port
  @destination = destination
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



256
257
258
# File 'lib/terraformdsl/aws.rb', line 256

def destination
  @destination
end

#portObject (readonly)

Returns the value of attribute port.



256
257
258
# File 'lib/terraformdsl/aws.rb', line 256

def port
  @port
end

#protocolObject (readonly)

Returns the value of attribute protocol.



256
257
258
# File 'lib/terraformdsl/aws.rb', line 256

def protocol
  @protocol
end