Merge pull request #1555 from fatih/fix-eip-panic

providers/aws: check allocationId only if it's vpc, fixes #1345
This commit is contained in:
Mitchell Hashimoto 2015-04-19 18:10:31 -07:00
commit dda4ae6d12
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error {
// Verify AWS returned our EIP
if len(describeAddresses.Addresses) != 1 ||
*describeAddresses.Addresses[0].AllocationID != id ||
(domain == "vpc" && *describeAddresses.Addresses[0].AllocationID != id) ||
*describeAddresses.Addresses[0].PublicIP != id {
if err != nil {
return fmt.Errorf("Unable to find EIP: %#v", describeAddresses.Addresses)