Class: TerraformDSL::AWS::Route53::Record

Inherits:
TerraformDSL::AWS::Resource show all
Defined in:
lib/terraformdsl/aws.rb

Instance Attribute Summary collapse

Attributes inherited from TerraformDSL::AWS::Resource

#parent

Instance Method Summary collapse

Methods inherited from TerraformDSL::AWS::Resource

#accept, #set_parent

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

#nameObject (readonly)

Returns the value of attribute name.



543
544
545
# File 'lib/terraformdsl/aws.rb', line 543

def name
  @name
end

#optsObject (readonly)

Returns the value of attribute opts.



543
544
545
# File 'lib/terraformdsl/aws.rb', line 543

def opts
  @opts
end

#typeObject (readonly)

Returns the value of attribute type.



543
544
545
# File 'lib/terraformdsl/aws.rb', line 543

def type
  @type
end

#valuesObject (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