From d55a0b6ef0352f4b06ba256e33a7d43cd5914655 Mon Sep 17 00:00:00 2001 From: Joseph Lawson Date: Tue, 21 Oct 2014 15:59:28 -0400 Subject: [PATCH] default eip domain to 'standard' for cloudformation creations --- moto/ec2/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 17955cc09..6038db092 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -1949,11 +1949,12 @@ class ElasticAddress(object): properties = cloudformation_json.get('Properties') instance_id = None if properties: + domain=properties.get('Domain') eip = ec2_backend.allocate_address( - domain=properties.get('Domain')) + domain=domain if domain else 'standard') instance_id = properties.get('InstanceId') else: - eip = ec2_backend.allocate_address() + eip = ec2_backend.allocate_address(domain='standard') if instance_id: instance = ec2_backend.get_instance_by_id(instance_id)