-
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
aws_security_group_rule not behaving idempotently #2366
Comments
Additional: on the first apply, the tfstate file looks like this (not the same run as above, so the IDs will differ):
The |
I tell a lie, the state file starts out correct after the first apply, but ends up incorrect after the second plan. Something about how the SG rules are read seems to be amiss. |
Thanks for the report - we're actively looking into this and we'll follow up later today. |
I'm pretty sure this is a scenario that will be fixed by #2376, especially since the key phrase here is "differ only by source security group id". So stay tuned on that PR for the incoming potential fix. |
I've just checked out the ref from #2376 and can confirm my test case now works as expected under that version. Thanks! |
Great news! |
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. |
If I add two SG rules to an SG, where the rules differ only by source security group id, Terraform gets confused on a second run and attempts to make changes where none are necessary.
Test case:
Initial plan:
Initial application:
Subsequent run of plan:
The text was updated successfully, but these errors were encountered: