fix eip physical_resource_id not returning an public_ip if it is in EC2 classic.

This commit is contained in:
Joseph Lawson 2014-10-21 16:37:54 -04:00
parent 54794651d3
commit d4cbc71b0a

View File

@ -1964,7 +1964,7 @@ class ElasticAddress(object):
@property
def physical_resource_id(self):
return self.allocation_id
return self.allocation_id if self.allocation_id else self.public_ip
def get_cfn_attribute(self, attribute_name):
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException