hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

[Docs]: aws_db_instance resource block have a Blue/Green Deployment enabled flag But It is not much more explaining the behaviour after enabling and the switover process #38733

Open pvshingala1997 opened 2 months ago

pvshingala1997 commented 2 months ago

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance

Description

We were able to enable the blue_green_update flag using terraform for AWS RDS but it did not changed anything on the console. We could find some details about handling the RDS Blue/Green Deployment using AWS Cli or Console but there were no detailed documentation about doing the operation through the terraform. We were able to see few articles listed below but we could not get through applying them in realtime. https://hashicorp.github.io/terraform-provider-aws/design-decisions/rds-bluegreen-deployments/

Requesting you to provide a detailed documentation about RDS blue Green Deployment.

References

https://hashicorp.github.io/terraform-provider-aws/design-decisions/rds-bluegreen-deployments/

Would you like to implement a fix?

No

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 2 months ago

Hey @pvshingala1997 👋 Thank you for taking the time to raise this!

We were able to enable the blue_green_update flag using terraform for AWS RDS but it did not changed anything on the console.

Are you able to supply a sample configuration so that whoever looks into this has that information available for review? I'd be interested in what you have set for apply_immediately based on the following note from the resource documentation:

Changes to a DB instance can occur when you manually change a parameter, such as allocated_storage, and are reflected in the next maintenance window. [omitted for brevity] You can use the apply_immediately flag to instruct the service to apply the change immediately (see documentation below).

pvshingala1997 commented 2 months ago

Hi @justinretzolk , That flag was not set. But again we kind of rebooted the server but still it dint went through we had to do it manually. Due to restrictions at my end for sharing a code, i would appriciate if you consider adding below block to rds instance configuration. blue_green_update { enabled = true }

justinretzolk commented 2 months ago

Hey @pvshingala1997 👋 Thanks for bearing with me while I consolidated our conversations to this one issue. Having them spread across three made it a bit hard to keep track of what was going on 😅.

Across the issues, the main points, as I've understood them, are:

  1. Seeing no change in the console when setting blue_green_update.enabled = true
  2. A perceived lack of documentation around how Blue/Green Deployments are handled with regards to the aws_db_instance resource
  3. A lack of an independent resource to handle blue/green deployments

As for the third point, we addressed that in detail in the design decisions document that you previous linked to.

Ultimately, exposing the blue/green deployment option isn't a good fit for the way that Terraform operates. For that reason, we took the approaches laid out in the design decisions document. I don't believe anything actually changes on the AWS console, because the blue_green_update block is only used to determine how the provider should update instances.

Similarly, I'm not sure there's anything to add to the aws_db_instance documentation. Setting blue_green_update.enabled = true is enough to tell the AWS Provider to use Blue/Green Deployments without any further configuration or user interaction. More succinctly, from the design decision log:

When the blue_green_update.enabled parameter is set, the AWS Provider will use a Blue/Green Deployment internally to perform the update, so that the downtime is only the length of the switchover.

I hope I've understood you correctly, and that this information helps. I'll leave this issue open for now, so that we can talk further if needed.