Class: TerraformDSL::AWS::RDS::SubnetGroup
- Inherits:
-
TerraformDSL::AWS::Resource
- Object
- TerraformDSL::AWS::Resource
- TerraformDSL::AWS::RDS::SubnetGroup
- Defined in:
- lib/terraformdsl/aws.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#subnets ⇒ Object
readonly
Returns the value of attribute subnets.
Attributes inherited from TerraformDSL::AWS::Resource
Instance Method Summary collapse
- #attr(attr) ⇒ Object
-
#initialize(name, subnets = []) ⇒ SubnetGroup
constructor
A new instance of SubnetGroup.
Methods inherited from TerraformDSL::AWS::Resource
Constructor Details
#initialize(name, subnets = []) ⇒ SubnetGroup
Returns a new instance of SubnetGroup.
336 337 338 339 340 341 |
# File 'lib/terraformdsl/aws.rb', line 336 def initialize(name, subnets=[]) subnets.all? {|x| x.is_a?(Subnet) } or raise TypeError.new("RDS::SubnetGroup(#{name.inspect}): 2nd argument should be an array of Subnet, but got: #{subnets.inspect}") @name = name @subnets = subnets end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
342 343 344 |
# File 'lib/terraformdsl/aws.rb', line 342 def name @name end |
#subnets ⇒ Object (readonly)
Returns the value of attribute subnets.
342 343 344 |
# File 'lib/terraformdsl/aws.rb', line 342 def subnets @subnets end |
Instance Method Details
#attr(attr) ⇒ Object
344 |
# File 'lib/terraformdsl/aws.rb', line 344 def attr(attr); "${aws_db_subnet_group.#{@name}.#{attr}}"; end |