0
votes

I use the terraform module, terraform-aws-modules/rds/aws (version: 2.20.0) provisioned MariaDB master and a replica. I would like to promote the replica to be a standalone DB instance. The document at https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html gives instruction of how to do it via AWS console. I would like to do it use terraform script. Anyone has idea of how to promote a replica to be a standalone DB instance using terraform script? My terraform version is v01.3.5.

1

1 Answers

1
votes

I a guessing you have the read replica resource via terraform.

From docs:

Removing the replicate_source_db attribute from an existing RDS Replicate database managed by Terraform will promote the database to a fully standalone database.

You can make a condition there to switch it on and off.