Skip to content

Commit dd2e0c3

Browse files
authored
Can use SecurityGroupId in default vpc SGs (#2691)
1 parent 2b354fb commit dd2e0c3

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py

-13
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ def check_ingress_rule(self, vpc_id, properties, path):
3636
)
3737
)
3838

39-
else:
40-
if properties.get("SourceSecurityGroupId", None):
41-
path_error = path[:] + ["SourceSecurityGroupId"]
42-
message = (
43-
"SourceSecurityGroupId shouldn't be specified for "
44-
"Non-Vpc Security Group at {0}"
45-
)
46-
matches.append(
47-
RuleMatch(
48-
path_error, message.format("/".join(map(str, path_error)))
49-
)
50-
)
51-
5239
return matches
5340

5441
def match(self, cfn):

test/unit/rules/resources/ec2/test_sg_ingress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ def test_file_positive(self):
2727
def test_file_negative(self):
2828
"""Test failure"""
2929
self.helper_file_negative(
30-
"test/fixtures/templates/bad/properties_sg_ingress.yaml", 2
30+
"test/fixtures/templates/bad/properties_sg_ingress.yaml", 1
3131
)

0 commit comments

Comments
 (0)