-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat: add aws_security_group_inline_rules rule #793
base: master
Are you sure you want to change the base?
feat: add aws_security_group_inline_rules rule #793
Conversation
Not sure how to decide about "enabled by default" and "severity". |
docs/rules/aws_security_group_egress_and_ingress_blocks_deprecated.md
Outdated
Show resolved
Hide resolved
docs/rules/aws_security_group_egress_and_ingress_blocks_deprecated.md
Outdated
Show resolved
Hide resolved
|
||
Refrain from using the `ingress` and `egress` arguments of the `aws_security_group` resource for in-line rules, as they have difficulties managing multiple CIDR blocks and historically lack unique IDs, tags, and descriptions. To prevent these issues, follow the best practice of using the `aws_vpc_security_group_egress_rule` and `aws_vpc_security_group_ingress_rule` resources, with one CIDR block per rule. | ||
|
||
Avoid using the `aws_security_group` resource with in-line rules (using the ingress and egress arguments) alongside the `aws_vpc_security_group_egress_rule`, `aws_vpc_security_group_ingress_rule`, or `aws_security_group_rule` resources. This practice can lead to rule conflicts, perpetual differences, and rules being overwritten. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These sentences appear to be copied from official references, but they feel a bit odd to include in this section.
Can you tidy up these sentences and rewrite them to explain why this rule is intended to disallow inline rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a duplication. Paragraph reworked.
Adds a new rule to ensure that
ingress
andegress
blocks inaws_security_group
are not used.Avoid using the
ingress
andegress
arguments of theaws_security_group
resource to configure in-line rules, as they have difficulties managing multiple CIDR blocks and lack unique IDs, tags, and descriptions. To prevent these issues, follow the current best practice of using theaws_vpc_security_group_egress_rule
andaws_vpc_security_group_ingress_rule
resources, with one CIDR block per rule.Closes #419