providers/aws: eip id-only
This commit is contained in:
parent
f394ce1ef3
commit
c1509b0220
|
@ -31,7 +31,6 @@ func TestAccAWSEBSVolume_NoIops(t *testing.T) {
|
|||
var v ec2.Volume
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
IDRefreshName: "aws_ebs_volume.iops_test",
|
||||
Providers: testAccProviders,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
|
|
|
@ -158,6 +158,14 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error {
|
|||
d.Set("private_ip", address.PrivateIpAddress)
|
||||
d.Set("public_ip", address.PublicIp)
|
||||
|
||||
// On import (domain never set, which it must've been if we created),
|
||||
// set the 'vpc' attribute depending on if we're in a VPC.
|
||||
if _, ok := d.GetOk("domain"); !ok {
|
||||
d.Set("vpc", *address.Domain == "vpc")
|
||||
}
|
||||
|
||||
d.Set("domain", address.Domain)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ func TestAccAWSEIP_basic(t *testing.T) {
|
|||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
IDRefreshName: "aws_eip.bar",
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEIPDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
|
@ -36,6 +37,7 @@ func TestAccAWSEIP_instance(t *testing.T) {
|
|||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
IDRefreshName: "aws_eip.bar",
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEIPDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
|
@ -63,6 +65,7 @@ func TestAccAWSEIP_network_interface(t *testing.T) {
|
|||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
IDRefreshName: "aws_eip.bar",
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEIPDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
|
@ -83,6 +86,7 @@ func TestAccAWSEIP_twoEIPsOneNetworkInterface(t *testing.T) {
|
|||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
IDRefreshName: "aws_eip.one",
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSEIPDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
|
|
Loading…
Reference in New Issue