-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Creation of aws_security_group_rule
succeeds but is not recorded in state file
#27024
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
This really needs more attention. It seems like the |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Terraform Core Version
1.3.0
AWS Provider Version
4.32.0
Affected Resource(s)
aws_security_group_rule
Expected Behavior
I expect Terraform to properly record that the security groups rules are attached to the SG.
Actual Behavior
Terraform does create the rules as expected but does not appear to record their creation.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Here is how the SG is created inside the ALB module:
Steps to Reproduce
aws_security_group
, attached to the ALBaws_security_group_rule
resources; attach them to theaws_security_group
resource created above.tf apply
You should observe:
aws_security_group
andaws_security_group_rule
resources (and, the ALB ... etc, of course!).aws_security_group
resource.aws_security_group_rule
resources but does not actually record their creation. An error along the lines ofInvalidPermission.Duplicate: the specified rule "peer: 0.0.0.0/0, TCP, from port: 80, to port: 80, ALLOW" already exists
is emitted.Debug Output
When setting
TF_LOG=trace
, I get north of 500K lines. I have tried totf {apply, import}
and have the better part of 2 million lines from the various attempts.I have run the logs through
sed
to replace some sensitive/specific details with placeholders.Here is a gist that contains what seem to be the most relevant lines. If the lines in the gist are not enough, I can provide the full and unobfuscated logs.
There are 3 logs from three operations here:
https://gist.github.com/karl-sprig/2d7cced14d193233b005a22b1bb3a9d0
Panic Output
There is no panic output, thankfully.
Important Factoids
No response
References
Might possibly be related: #12450
Probably is related / the same issue: #26125
A commenter on #26125 thinks that it might be related to #26021 but it seems like the pivitol log line in #26021 is
Which is present in some - but not all - of my TRACE level logs (see linked GIST)
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: