in qs_cfn_lint_rules/stack/MissingParameter.py [0:0]
def match(self, cfn):
"""Basic Matching"""
matches = []
# try:
resources = cfn.get_resources(
resource_type=['AWS::CloudFormation::Stack']
)
for r_name, r_values in resources.items():
properties = r_values.get('Properties')
child_template_url = properties.get('TemplateURL')
child_template_parameters = properties.get('Parameters')
if child_template_parameters is None:
child_template_parameters = {}
missing_parameters = self.parameter_mismatch(
current_template_path=os.path.abspath(cfn.filename),
parameters=child_template_parameters,
child_template_url=child_template_url,
mappings=cfn.get_mappings()
)
if missing_parameters:
path = ['Resources', r_name, 'Properties', 'Parameters']
message = 'Missing Child Stack parameters. {} {}'.format(
r_name,
missing_parameters
)
matches.append(RuleMatch(path, message))
return matches