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:
commit
dda4ae6d12
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue