Merge pull request #1701 from hashicorp/b-cannot-retrieve-eip
provider/aws: fix EIPs on new upstream sdk
This commit is contained in:
commit
4140253578
|
@ -102,8 +102,8 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error {
|
|||
domain := resourceAwsEipDomain(d)
|
||||
id := d.Id()
|
||||
|
||||
assocIds := []*string{}
|
||||
publicIps := []*string{}
|
||||
var assocIds []*string
|
||||
var publicIps []*string
|
||||
if domain == "vpc" {
|
||||
assocIds = []*string{aws.String(id)}
|
||||
} else {
|
||||
|
|
|
@ -66,8 +66,7 @@ func testAccCheckAWSEIPDestroy(s *terraform.State) error {
|
|||
}
|
||||
|
||||
req := &ec2.DescribeAddressesInput{
|
||||
AllocationIDs: []*string{},
|
||||
PublicIPs: []*string{aws.String(rs.Primary.ID)},
|
||||
PublicIPs: []*string{aws.String(rs.Primary.ID)},
|
||||
}
|
||||
describe, err := conn.DescribeAddresses(req)
|
||||
|
||||
|
@ -118,7 +117,6 @@ func testAccCheckAWSEIPExists(n string, res *ec2.Address) resource.TestCheckFunc
|
|||
if strings.Contains(rs.Primary.ID, "eipalloc") {
|
||||
req := &ec2.DescribeAddressesInput{
|
||||
AllocationIDs: []*string{aws.String(rs.Primary.ID)},
|
||||
PublicIPs: []*string{},
|
||||
}
|
||||
describe, err := conn.DescribeAddresses(req)
|
||||
if err != nil {
|
||||
|
@ -133,8 +131,7 @@ func testAccCheckAWSEIPExists(n string, res *ec2.Address) resource.TestCheckFunc
|
|||
|
||||
} else {
|
||||
req := &ec2.DescribeAddressesInput{
|
||||
AllocationIDs: []*string{},
|
||||
PublicIPs: []*string{aws.String(rs.Primary.ID)},
|
||||
PublicIPs: []*string{aws.String(rs.Primary.ID)},
|
||||
}
|
||||
describe, err := conn.DescribeAddresses(req)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue