Skip to content

Commit

Permalink
Merge pull request #3 from kddejong/FixLicensing
Browse files Browse the repository at this point in the history
Release 0.0.7
  • Loading branch information
kddejong committed Apr 17, 2018
2 parents 3c18379 + e6f0126 commit 95259ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
MIT No Attribution

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
'cfn-lint = cfnlint.__main__:main'
]
},
license='MIT',
license='MIT no attribution',
test_suite="unittest"
)
15 changes: 12 additions & 3 deletions src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,23 @@ def check_sgid_value(self, value, path):
def check_sgid_ref(self, value, path, parameters, resources):
"""Check ref for VPC"""
matches = list()

allowed_types = [
'AWS::SSM::Parameter::Value<AWS::EC2::SecurityGroup::Id>',
'AWS::EC2::SecurityGroup::Id'
]
if value in parameters:
parameter_properties = parameters.get(value)
parameter_type = parameter_properties.get('Type')
if parameter_type != 'AWS::EC2::SecurityGroup::Id':
if parameter_type not in allowed_types:
path_error = ['Parameters', value, 'Type']
message = "Security Group Id Parameter should be of type AWS::EC2::SecurityGroup::Id for {0}"
message = "Security Group Id Parameter should be of type [{0}] for {1}"
matches.append(
RuleMatch(path_error, message.format('/'.join(map(str, path_error)))))
RuleMatch(
path_error,
message.format(
', '.join(map(str, allowed_types)),
'/'.join(map(str, path_error)))))
if value in resources:
resource = resources.get(value, {})
resource_type = resource.get('Type', "")
Expand Down
2 changes: 1 addition & 1 deletion src/cfnlint/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '0.0.6'
__version__ = '0.0.7'

0 comments on commit 95259ed

Please sign in to comment.