get an aws_security_group_rules to delete unwanted stuffs #3095
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
Hi there,
Affected Resource(s)
Actual Behavior
Currently, if we have SG referecing each-other, we have to split at least one of them into an
aws_security_group_rule
and multipleaws_security_group_rule
.That works nicely, BUT, if we use
aws_security_group_rule
, it fails to notice if any rogue rule would be added by non-terraform, and would leave it there...Expected Behavior
A way to apply cyclic-rules, and still have the nice Terraform that would help and be able to remove hand-placed rules, like if we had them directly in
aws_security_group
.Suggested new resource
Creating an
aws_security_group_rules
would allow to move from:aws_security_group
SG1
with no security-ruleaws_security_group
SG2
with inline security-rules, referencing SG1aws_security_group_rule
for each rule wanted forSG1
and any extra rule for
SG1
not detected/handled by TF (as they could be in anyaws_security_group_rule
not handled by our current module), to:aws_security_group
SG1
with no security-ruleaws_security_group
SG2
with inline security-rules, referencing SG1aws_security_group_rules
for all the rules wanted forSG1
and the rules managed by
aws_security_group_rules
would be able to work like rules inSG2
, and detect any manual addition, and remove them properly.References
The original
aws_security_group_rule
seems to be from the following issue, that already suggested it, but was not implemented that way:Couldn't find any further discution about such resource, and reason to reject it.
The text was updated successfully, but these errors were encountered: