Class: TerraformDSL::AWS::RDS::Instance

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

Direct Known Subclasses

ReadReplica

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(name, machine_type) ⇒ Instance

Returns a new instance of Instance.



385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/terraformdsl/aws.rb', line 385

def initialize(name, machine_type)
  @name         = name
  @machine_type = machine_type
  @master_instance = nil
  @database     = {}
  @network      = {}
  @flags        = {}
  @storage      = {}
  @encryption   = {}
  @backup       = {}
  @monitoring   = {}
  @maintenance  = {}
end

Instance Attribute Details

#backupObject

Returns the value of attribute backup.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def backup
  @backup
end

#databaseObject

Returns the value of attribute database.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def database
  @database
end

#encryptionObject

Returns the value of attribute encryption.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def encryption
  @encryption
end

#flagsObject (readonly)

Returns the value of attribute flags.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def flags
  @flags
end

#machine_typeObject (readonly)

Returns the value of attribute machine_type.



398
399
400
# File 'lib/terraformdsl/aws.rb', line 398

def machine_type
  @machine_type
end

#maintenanceObject

Returns the value of attribute maintenance.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def maintenance
  @maintenance
end

#master_instanceObject (readonly)

Returns the value of attribute master_instance.



398
399
400
# File 'lib/terraformdsl/aws.rb', line 398

def master_instance
  @master_instance
end

#monitoringObject

Returns the value of attribute monitoring.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def monitoring
  @monitoring
end

#nameObject (readonly)

Returns the value of attribute name.



398
399
400
# File 'lib/terraformdsl/aws.rb', line 398

def name
  @name
end

#networkObject

Returns the value of attribute network.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def network
  @network
end

#storageObject

Returns the value of attribute storage.



399
400
401
# File 'lib/terraformdsl/aws.rb', line 399

def storage
  @storage
end

Instance Method Details

#attr(attr) ⇒ Object



438
# File 'lib/terraformdsl/aws.rb', line 438

def attr(attr); "${aws_db_instance.#{@name}.#{attr}}"; end