Class: TerraformDSL::AWS::Route53::Record
- Inherits:
-
TerraformDSL::AWS::Resource
- Object
- TerraformDSL::AWS::Resource
- TerraformDSL::AWS::Route53::Record
- Defined in:
- lib/terraformdsl/aws.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Attributes inherited from TerraformDSL::AWS::Resource
Instance Method Summary collapse
- #attr(attr) ⇒ Object
-
#initialize(type, name, values, opts = {}) ⇒ Record
constructor
A new instance of Record.
Methods inherited from TerraformDSL::AWS::Resource
Constructor Details
#initialize(type, name, values, opts = {}) ⇒ Record
Returns a new instance of Record.
535 536 537 538 539 540 541 542 |
# File 'lib/terraformdsl/aws.rb', line 535 def initialize(type, name, values, opts={}) RECORD_TYPES.include?(type) or raise "#{type.inspect}: unknown record type." @type = type @name = name @values = [values].flatten @opts = opts end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
543 544 545 |
# File 'lib/terraformdsl/aws.rb', line 543 def name @name end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
543 544 545 |
# File 'lib/terraformdsl/aws.rb', line 543 def opts @opts end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
543 544 545 |
# File 'lib/terraformdsl/aws.rb', line 543 def type @type end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
543 544 545 |
# File 'lib/terraformdsl/aws.rb', line 543 def values @values end |
Instance Method Details
#attr(attr) ⇒ Object
545 |
# File 'lib/terraformdsl/aws.rb', line 545 def attr(attr); "${aws_route53_record.#{@name}.#{attr}}"; end |