If Properies isn't set, cloudformation will just use default values

This commit is contained in:
William Richard 2018-03-26 14:11:12 -04:00
commit 0ed388b4b8
No known key found for this signature in database
GPG key ID: F7F8BA4DDBE1ABED
2 changed files with 71 additions and 22 deletions

View file

@ -61,7 +61,11 @@ class Cluster(BaseObject):
@classmethod
def create_from_cloudformation_json(cls, resource_name, cloudformation_json, region_name):
properties = cloudformation_json['Properties']
# if properties is not provided, cloudformation will use the default values for all properties
if 'Properties' in cloudformation_json:
properties = cloudformation_json['Properties']
else:
properties = {}
ecs_backend = ecs_backends[region_name]
return ecs_backend.create_cluster(