-
Notifications
You must be signed in to change notification settings - Fork 9.5k
aws_db_instance seemingly ignores backup_retention_period #8380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The AWS docs do specify that Postgres read replicas don't do automated backups, only manual snapshots. Also looking at AWS SDK Go, it seems like you need to enable automated backups on the master instance, not the replica. |
@catherinetcai You're right, backups do need to be specified on the master. However, that didn't work until I recreated the master with the right setting: modification didn't fly. This is the code that worked in the end:
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
aws_db_instance
Terraform Configuration Files
Debug Output
It will take me some time to sanitize the full debug output - do let me know if it's needed.
Panic Output
Expected Behavior
Replica should have been created
Actual Behavior
aws_db_instance.replica: Error creating DB Instance: InvalidDBInstanceState: Automated backups are not enabled for this database instance. To enable automated backups, use ModifyDBInstance to set the backup retention period to a non-zero value.
Steps to Reproduce
terraform apply
Important Factoids
According to documentation,
backup_retention_period
is to be> 0
for replicas. It is, but the resource still fails to create.References
The text was updated successfully, but these errors were encountered: