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

Use name_prefix and create_before_destroy on security groups #86

Open
ac-hibbert opened this issue Oct 20, 2020 · 2 comments
Open

Use name_prefix and create_before_destroy on security groups #86

ac-hibbert opened this issue Oct 20, 2020 · 2 comments
Labels
bug 🐛 An issue with the system

Comments

@ac-hibbert
Copy link
Contributor

ac-hibbert commented Oct 20, 2020

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

It can be a pain when the security group name changes as it would not be able to destroy - potentially using this pattern would work - https://github.com/terraform-aws-modules/terraform-aws-security-group/blob/master/main.tf#L34

Expected Behavior

Able to create new security group and assign it prior to destroy

@ac-hibbert ac-hibbert added the bug 🐛 An issue with the system label Oct 20, 2020
@Nuru
Copy link
Sponsor Contributor

Nuru commented Dec 4, 2020

I do not understand the problem. Why would the security group name change? How is creating a new security group with a new name solving the problem?

@vsimon
Copy link

vsimon commented Mar 13, 2021

@Nuru maybe because a new security group might allow cluster to modify its settings to change to the new group before deleting the old one? Otherwise with a replacement operation, I don't think it will allow you to delete the sg first if it's in use. The group name change for a prefix is probably so that two names don't collide due to create_before_destroy.

I might have just hit a similar issue in the cloudposse/terraform-aws-elasticache-redis module, I just left a comment in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants