Class: TerraformDSL::AWS::RDS::ReadReplica
Instance Attribute Summary
Attributes inherited from Instance
#backup, #database, #encryption, #flags, #machine_type, #maintenance, #master_instance, #monitoring, #name, #network, #storage
#parent
Instance Method Summary
collapse
#accept, #set_parent
Constructor Details
#initialize(name, machine_type, master_instance) ⇒ ReadReplica
Returns a new instance of ReadReplica.
445
446
447
448
|
# File 'lib/terraformdsl/aws.rb', line 445
def initialize(name, machine_type, master_instance)
super(name, machine_type)
@master_instance = master_instance
end
|
Instance Method Details
#attr(attr) ⇒ Object
480
|
# File 'lib/terraformdsl/aws.rb', line 480
def attr(attr); "${aws_db_instance.#{@name}.#{attr}}"; end
|
#database=(port: nil) ⇒ Object
450
451
452
453
|
# File 'lib/terraformdsl/aws.rb', line 450
def database=(port: nil)
@database = {}
@database[:port] = port unless port.nil?
end
|
#encryption=(enable: nil) ⇒ Object
464
465
466
|
# File 'lib/terraformdsl/aws.rb', line 464
def encryption=(enable: nil)
@encryption = {enable: enable}
end
|
#maintenance=(auto_upgrade: true, maintenace_window: nil) ⇒ Object
475
476
477
478
|
# File 'lib/terraformdsl/aws.rb', line 475
def maintenance=(auto_upgrade: true, maintenace_window: nil)
@maintenace = {auto_upgrade: auto_upgrade,
maintenace_window: maintenace_window}
end
|
#monitoring=(interval: nil, role: nil) ⇒ Object
468
469
470
471
472
473
|
# File 'lib/terraformdsl/aws.rb', line 468
def monitoring=(interval: nil, role: nil)
if interval && interval > 0
role ||= RDS_MONITORING_ROLE_NAME
end
@monitoring = {interval: interval, role: role}
end
|
#network=(region: nil, subnet_group: nil, az: nil, public_access: nil, multi_az: nil) ⇒ Object
455
456
457
458
|
# File 'lib/terraformdsl/aws.rb', line 455
def network=(region: nil, subnet_group: nil, az: nil, public_access: nil, multi_az: nil)
@network = {region: region, subnet_group: subnet_group,
az: az, public_access: public_access, multi_az: multi_az}
end
|
#storage=(type: nil, size: nil) ⇒ Object
460
461
462
|
# File 'lib/terraformdsl/aws.rb', line 460
def storage=(type: nil, size: nil)
@storage = {type: type, size: size}
end
|