Fix cloudformation NoValue parsing to not add attribute. Closes #870
This commit is contained in:
parent
042524fe80
commit
e3bff8b926
@ -158,7 +158,11 @@ def clean_json(resource_json, resources_map):
|
||||
|
||||
cleaned_json = {}
|
||||
for key, value in resource_json.items():
|
||||
cleaned_json[key] = clean_json(value, resources_map)
|
||||
cleaned_val = clean_json(value, resources_map)
|
||||
if cleaned_val is None:
|
||||
# If we didn't find anything, don't add this attribute
|
||||
continue
|
||||
cleaned_json[key] = cleaned_val
|
||||
return cleaned_json
|
||||
elif isinstance(resource_json, list):
|
||||
return [clean_json(val, resources_map) for val in resource_json]
|
||||
|
@ -382,6 +382,7 @@ def test_stack_elb_integration_with_update():
|
||||
"Protocol": "HTTP",
|
||||
}
|
||||
],
|
||||
"Policies": {"Ref" : "AWS::NoValue"},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user