-
Notifications
You must be signed in to change notification settings - Fork 74
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_rule_deprecated rule #790
feat: add aws_security_group_rule_deprecated rule #790
Conversation
@@ -0,0 +1,31 @@ | |||
# aws_security_group_rule_deprecated | |||
|
|||
// TODO: Write the rule's description here |
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.
TODO
func (r *AwsSecurityGroupRuleDeprecatedRule) Check(runner tflint.Runner) error { | ||
resources, err := runner.GetResourceContent(r.resourceType, &hclext.BodySchema{ | ||
Attributes: []hclext.AttributeSchema{ | ||
{Name: r.attributeName}, |
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.
Is there even a need to parse attributes here? Seems not, just the existence of the resource should trigger.
Co-authored-by: Ben Drucker <bvdrucker@gmail.com>
Everything addressed, docs reworked. |
Not sure how to decide about "enabled by default" and "severity". |
Adds a rule which generates a warning if a
aws_security_group_rule
is used. According to the docs theaws_vpc_security_group_egress_rule
oraws_vpc_security_group_ingress_rule
should be used.https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule