Skip to content

Latest commit

 

History

History

replica-postgres

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Master and Replica RDS example for PostgreSQL

Configuration in this directory creates set of RDS resources demonstrating master and replica in the same VPC.

Usage

To run this example you need to execute:

$ terraform init
$ terraform plan
$ terraform apply

Note that this example may create resources which cost money. Run terraform destroy when you don't need these resources.

Requirements

Name Version
terraform >= 1.0
aws >= 5.62

Providers

Name Version
aws >= 5.62

Modules

Name Source Version
master ../../ n/a
replica ../../ n/a
security_group terraform-aws-modules/security-group/aws ~> 5.0
vpc terraform-aws-modules/vpc/aws ~> 5.0

Resources

Name Type
aws_availability_zones.available data source

Inputs

No inputs.

Outputs

Name Description
master_db_instance_address The address of the RDS instance
master_db_instance_arn The ARN of the RDS instance
master_db_instance_availability_zone The availability zone of the RDS instance
master_db_instance_cloudwatch_log_groups Map of CloudWatch log groups created and their attributes
master_db_instance_endpoint The connection endpoint
master_db_instance_engine The database engine
master_db_instance_engine_version_actual The running version of the database
master_db_instance_hosted_zone_id The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record)
master_db_instance_identifier The RDS instance identifier
master_db_instance_name The database name
master_db_instance_port The database port
master_db_instance_resource_id The RDS Resource ID of this instance
master_db_instance_status The RDS instance status
master_db_instance_username The master username for the database
master_db_subnet_group_arn The ARN of the db subnet group
master_db_subnet_group_id The db subnet group name
replica_db_instance_address The address of the RDS instance
replica_db_instance_arn The ARN of the RDS instance
replica_db_instance_availability_zone The availability zone of the RDS instance
replica_db_instance_cloudwatch_log_groups Map of CloudWatch log groups created and their attributes
replica_db_instance_endpoint The connection endpoint
replica_db_instance_engine The database engine
replica_db_instance_engine_version_actual The running version of the database
replica_db_instance_hosted_zone_id The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record)
replica_db_instance_identifier The RDS instance identifier
replica_db_instance_name The database name
replica_db_instance_port The database port
replica_db_instance_resource_id The RDS Resource ID of this instance
replica_db_instance_status The RDS instance status
replica_db_instance_username The replica username for the database