Skip to content
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

AWS Aurora Blue/Green Update #28956

Closed
PackiarajSakkananGW opened this issue Jan 18, 2023 · 10 comments
Closed

AWS Aurora Blue/Green Update #28956

PackiarajSakkananGW opened this issue Jan 18, 2023 · 10 comments
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/rds Issues and PRs that pertain to the rds service.

Comments

@PackiarajSakkananGW
Copy link

PackiarajSakkananGW commented Jan 18, 2023

Description

blue_green_update is valid only for aws_db_instance and does not work with aws_rds_cluster_instance . As per the documentation aws_rds_cluster_instance is the recommended way to manage aurora instance. If that is the case, blue_green_update should work with Auroa. (aws_rds_cluster_instance)

Affected Resource(s) and/or Data Source(s)

aws_rds_cluster, aws_rds_cluster_instance

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

@PackiarajSakkananGW PackiarajSakkananGW added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Jan 18, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

@justinretzolk justinretzolk added service/rds Issues and PRs that pertain to the rds service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 18, 2023
@PackiarajSakkananGW PackiarajSakkananGW changed the title [Enhancement]: AWS Aurora Blue/Green Update AWS Aurora Blue/Green Update Jan 18, 2023
@danielkza
Copy link

Additionally, support for manually managing blue-green deployment resources would be nice, for longer-running validation or more complex scenarios.

@cameronattard
Copy link

It would be great to get this prioritised. Major version upgrades with Terraform are currently incredibly painful without this feature.

@ribejara-te
Copy link

Yup, big thumbs up to this.

@breathingdust breathingdust added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 25, 2023
@autotune
Copy link
Contributor

autotune commented Oct 5, 2023

I'm volunteering to work on this issue, this is going to be PR number 7 of my hundred days of Terraform contributions challenge.

@autotune
Copy link
Contributor

autotune commented Oct 10, 2023

I had initially tried to build it in as part of a mapping within the aws_rds_cluster resource, but I think I am going to have to re-work this to be its own resource. Think something like:

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

resource "aws_rds_cluster_blue_green" "example" {
db_cluster_identifier = aws_rds_cluster_instance.example.cluster_identifier
enabled = true
}

Then we can have a depends_on block to the instances that need to be created first in order for this to work. That's the simplest route to getting this working in a way that makes sense.

I added a new blue_green_clusters.go file and changed everything from DBInstance to DBCluster in the original code and functions/methods and it seems to be working locally. WIP tag to be removed hopefully in the next day or two.

There was no testing available for the map method, creating a new resource so we can actually have tests for this.

@autotune
Copy link
Contributor

autotune commented Oct 18, 2023

@gdavison

This is about 75 percent done, but given RDS Aurora takes 40 minutes or so for a full deployment on each run plus 20 minutes (haven't timed the deletion period yet exactly) or so to delete, it has taken some time to create, read, update, and delete the resource code and test. If you could evaluate what I've got so far once the linter checks are fixed in the second PR noted above that would be great, if you plan to take it over and do your own version/rewrite it would be greatly appreciated if you could let me know.

@Priyank-Vaghela
Copy link

I am in the same boat. Big thumbs up to this functionality. This feature would be a significant improvement and prioritizing it would be beneficial, as DB/maintenance upgrades are currently quite challenging without aws_rds_cluster_instance - blue_green_update with Terraform.

@gdavison
Copy link
Contributor

Thank you all for the discussion here.

Unfortunately, Blue/Green Deployments would not work the same with with Aurora clusters as they do with aws_db_instance. With aws_db_instance, they work because it is a single, self-contained resource, so the Blue/Green Deployment can be created, apply its updates, be switched over, and deleted all in one step. Aurora clusters, however, are made up of one aws_rds_cluster and at least one aws_rds_cluster_instance. A Blue/Green Deployment created for one resource would have to complete before the other related resources are updated.

A stand-alone resource for RDS Blue/Green Deployments does not fit with the Terraform model of declarative infrastructure: Using the resource would require multiple iterations of editing the Terraform configuration, applying the configuration, or importing resources. A separate tool that can manage the orchestration steps would be a better fit.

For more details, see #34551

@gdavison gdavison closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2023
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
9 participants