-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: Remove prefix_list_ids
attribute from *_with_self
resouces
#324
Conversation
`aws_security_group_rule` with both `self = true` and non-empty `prefix_list_ids` generates multiple (# of self + # of prefix_list_ids) rules for self and each prefix_list_ids, for example, ```terraform resource "aws_security_group_rule" "ingress_with_self" { security_group_id = local.this_sg_id type = "ingress" self = true prefix_list_ids = ["id1", "id2"] description = "sample" from_port = -1 to_port = -1 protocol = "-1" } ``` then we get the rules **not only** allow all-all from self SG, **but also** allow all-all from prefix-list `id1` and allow all-all from prefix-list `id2`. I think this is unexpected result, `ingress_with_self` itself should only add rule to allow self SG, so remove `prefix_list_ids` attribute from `*_with_self` resouces.
prefix_list_ids
attribute from *_with_self
resoucesprefix_list_ids
attribute from *_with_self
resouces
Same thing with Edit : Open #325 for this |
This PR has been automatically marked as stale because it has been open 30 days |
@antonbabenko @bryantbiggs We are still blocking for production, we are waiting for this update |
This PR has been automatically marked as stale because it has been open 30 days |
This PR was automatically closed because of stale in 10 days |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
aws_security_group_rule
with bothself = true
and non-emptyprefix_list_ids
generates multiple (# of self + # of prefix_list_ids) rules for self and each prefix_list_ids, for example,then we get the rules not only allow all-all from self SG, but also allow all-all from prefix-list
id1
and allow all-all from prefix-listid2
. I think this is unexpected result,ingress_with_self
itself should only add rule to allow self SG, so removeprefix_list_ids
attribute from*_with_self
resouces.Motivation and Context
Described as above.
Breaking Changes
This change avoid creating SG rules allow all-all from each prefix-list, this is breaking change.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request