-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: DependencyViolation on aws_security_group with circular route dependencies #2996
Comments
The handling of security groups referencing other security groups is quirky in a number of ways, which is why the separate Would it work for you to switch to using separate rule resources to represent your configuration? Which is not to say that what you saw isn't a bug, but I'm beginning to wonder if inline rules inside security groups ought to just be deprecated altogether since they have always acted kinda funky. |
@apparentlymart thanks for that. I indeed switched to using However, unfortunately that resource has another problem where it doesn't recognise existing rules that don't have a cidr block, but instead reference an other source rule. It seems to be related to #2584 and causes a second TF run to want to create "missing" rules, which fails due to duplication. |
Hey Friends – security groups and security group rules have been through a lot since this issue was open, and I'm confident this issue is resolved. If you're still hitting it, please let us know! |
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. |
I'm getting errors like this:
When trying to delete through the AWS web interface, I get this notification when trying to remove:
This happens because of rules like this:
The problem is that there are circular dependencies which can't be resolved by removing one security group before the other, because they all have rules depending on other groups.
So instead, Terraform should first remove all rules, before removing the group itself.
The text was updated successfully, but these errors were encountered: