Closed ohshazbot closed 4 months ago
Love this rule idea and think it's generalizable beyond this specific resource type: https://github.com/aws-cloudformation/cfn-lint/pull/3023
This wold be really helpful also to detect duplicate Config Rules when deploying either via CloudFormation or Conformance Packs. Some rule templates or conformance packs can have 100's resources and that could lead to duplication of rules. We could use the linter to detect those duplicate rules and make those templates more efficient.
+1 on this! Would make detecting duplicate Config rules much easier.
For the Config rule request.
Want to make sure we are focused on the right spot. You are talking about the source properties correct? We would be making sure that the combination of Owner
and SourceIdentifier
is unique?
Source:
Owner: AWS
SourceIdentifier: "REQUIRED_TAGS"
@PatMyron for the original request. Would we use the primaryIdentifier property and determine if that is unique across the template.
Correct @kddejong that will allow us to detect if in a single template there are 2 of the same exact rule. We just want to soft warn on it. There are use cases where that is valid in most cases we are seeing that customers are deploying the same rule twice. WE would like to help them detect that.
*cfn-lint version: 0.26.0
Description of issue. In a copy paste error, I ended up creating a 2nd iam policy attached to a role that had a different cfn logical name, but the same PolicyName. When this deployed, it caused one of the policies to not be created (due to name collision). It would have been super nice had the linter detected that I was attempting to create multiple policies with the same name for the same role.