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

feat: Set create_before_destroy on subnet group #29

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

alisson276
Copy link
Contributor

@alisson276 alisson276 commented Jan 29, 2025

Description

Added

lifecycle {
    create_before_destroy = true
  }

to aws_elasticache_subnet_group.this

Motivation and Context

Tried to rename a subnet_group (because I changed the redis name) and it fails to delete, because it was in-use.
Error:

│ Error: deleting ElastiCache Subnet Group (testing-c3d280ab-2765-b1e7-5be0-bf71f8e80960): operation error ElastiCache: DeleteCacheSubnetGroup, https response error StatusCode: 400, RequestID: b891773d-fc27-40a5-8c77-3af7ecbe6442, CacheSubnetGroupInUse: Cache subnet group testing-c3d280ab-2765-b1e7-5be0-bf71f8e80960 is currently in use by a cache cluster.

Breaking Changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Copy link

github-actions bot commented Mar 1, 2025

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Mar 1, 2025
@alisson276
Copy link
Contributor Author

Can someone review this PR?

@github-actions github-actions bot removed the stale label Mar 2, 2025
@bryantbiggs
Copy link
Member

closing since this is doing the opposite of what has been described

@bryantbiggs bryantbiggs reopened this Mar 30, 2025
@bryantbiggs bryantbiggs changed the title fix: Without create_before_destroy is not possible to rename a subnet_group feat: Set create_before_destroy on subnet group Mar 30, 2025
@bryantbiggs bryantbiggs merged commit 9133f1e into terraform-aws-modules:master Mar 30, 2025
15 checks passed
antonbabenko pushed a commit that referenced this pull request Mar 30, 2025
## [1.6.0](v1.5.0...v1.6.0) (2025-03-30)

### Features

* Set `create_before_destroy` on subnet group ([#29](#29)) ([9133f1e](9133f1e))
@antonbabenko
Copy link
Member

This PR is included in version 1.6.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants