Class: TerraformDSL::AWS::Ingress

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) ⇒ Ingress

Returns a new instance of Ingress.



233
234
235
236
237
238
239
# File 'lib/terraformdsl/aws.rb', line 233

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

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



240
241
242
# File 'lib/terraformdsl/aws.rb', line 240

def destination
  @destination
end

#portObject (readonly)

Returns the value of attribute port.



240
241
242
# File 'lib/terraformdsl/aws.rb', line 240

def port
  @port
end

#protocolObject (readonly)

Returns the value of attribute protocol.



240
241
242
# File 'lib/terraformdsl/aws.rb', line 240

def protocol
  @protocol
end