Skip to content

Commit 40e40bc

Browse files
authored
Remove exceptions for GetAtts to SGs (#3927)
1 parent 9436909 commit 40e40bc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/cfnlint/rules/functions/GetAttFormat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def __init__(self):
2424
self.parent_rules = ["E1010"]
2525
self._exceptions = [
2626
# Need to measure for completeness of automation
27-
"AWS::EC2::SecurityGroup.GroupId",
28-
"AWS::EC2::SecurityGroup.GroupIds",
27+
# "AWS::EC2::SecurityGroup.GroupId",
28+
# "AWS::EC2::SecurityGroup.GroupIds",
2929
]
3030
self._resource_type_exceptions = [
3131
"AWS::CloudFormation::CustomResource",

test/unit/rules/functions/test_getatt_format.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.fixture(scope="module")
1313
def rule():
1414
rule = GetAttFormat()
15+
rule._exceptions = ["AWS::EC2::SecurityGroup.Id"]
1516
yield rule
1617

1718

@@ -62,7 +63,7 @@ def template():
6263
(
6364
"Valid GetAtt because of exception",
6465
["MyBucket", "Arn"],
65-
{"format": "AWS::EC2::SecurityGroup.GroupId"},
66+
{"format": "AWS::EC2::SecurityGroup.Id"},
6667
[],
6768
),
6869
(

0 commit comments

Comments
 (0)