Skip to content

Conversation

jhenry82
Copy link
Contributor

Description

Add a create_before_destroy lifecycle block to the aws_rds_cluster_instance resources.

Motivation and Context

This improves time to recover in the (uncommon) case where the DB instances have to be replaced, for example to change their identifier or network configuration. We have observed that it can take nearly 10 minutes to destroy an Aurora instance. And then a similar time to create its replacement. During this time the DB is inaccessible. By using create_before_destroy, there is only a small interruption while one of the new instances is promoted to the Writer role. Which seems to typically take less than 30 seconds.

Breaking Changes

N/A

How Has This Been Tested?

  • I have tested and validated these changes using an internal fork of this module
  • I have executed pre-commit run -a on my pull request

There is nothing to change in the examples, everything is internal to the code of the module.

@jhenry82 jhenry82 changed the title Add create_before_destroy to Aurora instance fix: Add create_before_destroy to Aurora instance May 28, 2025
@bryantbiggs bryantbiggs changed the title fix: Add create_before_destroy to Aurora instance feat: Add create_before_destroy to Aurora DB instance resource Jun 4, 2025
@bryantbiggs bryantbiggs merged commit 6468f81 into terraform-aws-modules:master Jun 4, 2025
14 of 15 checks passed
antonbabenko pushed a commit that referenced this pull request Jun 4, 2025
## [9.14.0](v9.13.0...v9.14.0) (2025-06-04)

### Features

* Add `create_before_destroy` to Aurora DB instance resource ([#506](#506)) ([6468f81](6468f81))
@antonbabenko
Copy link
Member

This PR is included in version 9.14.0 🎉

Copy link

github-actions bot commented Jul 5, 2025

I'm going to lock this pull request 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 related to this change, 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 Jul 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants