From d6ba5552f162774b4a911360e771dfd99b1a3f38 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 14 Feb 2018 10:46:55 +0000 Subject: [PATCH] resource/aws_vpc_endpoint: Treat pending as expected state during deletion --- aws/resource_aws_vpc_endpoint.go | 2 +- aws/resource_aws_vpc_endpoint_test.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint.go b/aws/resource_aws_vpc_endpoint.go index 96f26a17e76..e8a895332d7 100644 --- a/aws/resource_aws_vpc_endpoint.go +++ b/aws/resource_aws_vpc_endpoint.go @@ -257,7 +257,7 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro } stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "deleting"}, + Pending: []string{"available", "pending", "deleting"}, Target: []string{"deleted"}, Refresh: vpcEndpointStateRefresh(conn, d.Id()), Timeout: 10 * time.Minute, diff --git a/aws/resource_aws_vpc_endpoint_test.go b/aws/resource_aws_vpc_endpoint_test.go index 97564b52f28..5d5f1baa67a 100644 --- a/aws/resource_aws_vpc_endpoint_test.go +++ b/aws/resource_aws_vpc_endpoint_test.go @@ -76,7 +76,6 @@ func TestAccAwsVpcEndpoint_gatewayWithRouteTableAndPolicy(t *testing.T) { resource.TestCheckResourceAttr("aws_vpc_endpoint.s3", "security_group_ids.#", "0"), resource.TestCheckResourceAttr("aws_vpc_endpoint.s3", "private_dns_enabled", "false"), ), - ExpectNonEmptyPlan: true, }, }, })