Elastic IP PhysicalResourceId should always be its public IP (#841)

According to the [CloudFormation `Ref` docs][docs], the `Ref` return
value (and physical ID of the resource) for an Elastic IP is its public
IP address.

[docs]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html
This commit is contained in:
Andy Freeland 2017-03-04 19:40:43 -08:00 committed by Steve Pulec
commit 783242b696
2 changed files with 3 additions and 3 deletions

View file

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