Skip to content

peteshar/terraform-aws-rds-mysql-read-replica

 
 

Repository files navigation

terraform-aws-rds-mysql-read-replica

Create an MySQL RDS read replica in the same region as another RDS instance

Requirements

Name Version
terraform >= 0.12.20

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
backup_retention_period How long to keep RDS backups (in days) number 0 no
cloudwatch_log_exports Log types to export to CloudWatch list(string)
[
"audit",
"error",
"general",
"slowquery"
]
no
copy_tags_to_snapshot If true, RDS instance tags will be copied to snapshots bool true no
enable_deletion_protection If true, deletion protection will be turned on for the RDS instance(s) bool true no
engine_version Version of database engine to use string null no
final_snapshot_identifier name of final snapshot (will be computed automatically if not specified) string null no
iam_database_authentication_enabled Whether or not to enable IAM DB authentication bool false no
identifier_prefix DB identifier prefix (will be generated by AWS automatically if not specified) string null no
instance_class What instance type to use string "db.t3.small" no
monitoring_interval Monitoring interval in seconds (0 to disable enhanced monitoring) number 0 no
monitoring_role_arn Enhanced Monitoring ARN (blank to omit) string null no
multi_az whether to make database multi-az bool false no
name common name for resources in this module string "mysql-rds" no
parameters Database parameters (will create parameter group if not null)
list(object({
apply_method = string
name = string
value = string
}))
[
{
"apply_method": "immediate",
"name": "character_set_database",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "character_set_connection",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "character_set_filesystem",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "character_set_results",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "character_set_server",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "character_set_client",
"value": "utf8"
},
{
"apply_method": "immediate",
"name": "collation_connection",
"value": "utf8_bin"
},
{
"apply_method": "immediate",
"name": "collation_server",
"value": "utf8_bin"
},
{
"apply_method": "immediate",
"name": "max_allowed_packet",
"value": "1073741824"
},
{
"apply_method": "immediate",
"name": "read_only",
"value": "1"
}
]
no
performance_insights_enabled If true, performance insights will be enabled bool false no
port Port the database should listen on string "3306" no
replicate_source_db_id ID of RDS instance to replicate from string null no
skip_final_snapshot If true no final snapshot will be taken on termination bool false no
storage_encrypted Encrypt DB storage bool true no
storage_type What storage backend to use (gp2 or standard. io1 not supported) string "gp2" no
tags Tags to apply to supported resources map(string) {} no

Outputs

Name Description
address RDS database address
instance_connection_info Object containing connection info
instance_id Instance ID of RDS DB

Packages

No packages published

Languages

  • HCL 85.4%
  • Shell 14.6%