Replies: 2 comments
-
Looks good. I think the suggested rules are useful. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
aws_security_group_rule
,aws_route
,aws_iam_role_policy_attachment
can all lead to drift that Terraform is unable to correct because they don't allow for exclusively managing the containing resource (security group, route table, IAM role respectively).This is probably not an exhaustive list of resources like this.
This can cause issues where changes can be introduced to these resources and Terraform is unaware of them and unable to correct them. As a general rule, I push colleagues to use the exclusive managing resources but it's a regular thing that comes up during code review. It would be helpful if we could lint on this instead (with the normal opt out via comments where appropriate).
Would you be open to a pull request (or potentially one per resource) that adds a non default enabled rule that forbids the use of eg
aws_security_group_rule
in favour ofaws_security_group
rule blocks?Beta Was this translation helpful? Give feedback.
All reactions