Currently, Terraform does not natively support performing a switchover for RDS Blue/Green deployments via a direct Terraform resource or argument. The Terraform configuration allows you to create and manage the Blue/Green environments, but the switchover action itself (switching from the Blue to the Green environment) is an operational action that typically needs to be done via the AWS Management Console, AWS CLI, or an API call.
If you perform the switchover manually outside of Terraform (e.g., using the AWS Console, CLI, or SDK), it will not automatically update Terraform’s state, leading to drift. This means Terraform will not be aware of the switchover action, and any subsequent Terraform actions might conflict or behave unexpectedly.
Affected Resource(s) and/or Data Source(s)
aws_db_instance
Potential Terraform Configuration
Terraform configuration to trigger the switchover on the aws_db_instance resource controlled by a parameter switch_over = true
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
Currently, Terraform does not natively support performing a switchover for RDS Blue/Green deployments via a direct Terraform resource or argument. The Terraform configuration allows you to create and manage the Blue/Green environments, but the switchover action itself (switching from the Blue to the Green environment) is an operational action that typically needs to be done via the AWS Management Console, AWS CLI, or an API call.
If you perform the switchover manually outside of Terraform (e.g., using the AWS Console, CLI, or SDK), it will not automatically update Terraform’s state, leading to drift. This means Terraform will not be aware of the switchover action, and any subsequent Terraform actions might conflict or behave unexpectedly.
Affected Resource(s) and/or Data Source(s)
aws_db_instance
Potential Terraform Configuration
References
https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/design-decisions/rds-bluegreen-deployments.md
Would you like to implement a fix?
No