Skip to content

Commit

Permalink
Remove exceptions for GetAtts to SGs (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Jan 25, 2025
1 parent 9436909 commit 40e40bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cfnlint/rules/functions/GetAttFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self):
self.parent_rules = ["E1010"]
self._exceptions = [
# Need to measure for completeness of automation
"AWS::EC2::SecurityGroup.GroupId",
"AWS::EC2::SecurityGroup.GroupIds",
# "AWS::EC2::SecurityGroup.GroupId",
# "AWS::EC2::SecurityGroup.GroupIds",
]
self._resource_type_exceptions = [
"AWS::CloudFormation::CustomResource",
Expand Down
3 changes: 2 additions & 1 deletion test/unit/rules/functions/test_getatt_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@pytest.fixture(scope="module")
def rule():
rule = GetAttFormat()
rule._exceptions = ["AWS::EC2::SecurityGroup.Id"]
yield rule


Expand Down Expand Up @@ -62,7 +63,7 @@ def template():
(
"Valid GetAtt because of exception",
["MyBucket", "Arn"],
{"format": "AWS::EC2::SecurityGroup.GroupId"},
{"format": "AWS::EC2::SecurityGroup.Id"},
[],
),
(
Expand Down

0 comments on commit 40e40bc

Please sign in to comment.