diff --git a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go index 5c59e2221..673435dab 100644 --- a/builtin/providers/aws/resource_aws_vpc_endpoint_test.go +++ b/builtin/providers/aws/resource_aws_vpc_endpoint_test.go @@ -61,6 +61,26 @@ func TestAccAWSVpcEndpoint_withRouteTableAndPolicy(t *testing.T) { }) } +func TestAccAWSVpcEndpoint_WithoutRouteTableOrPolicyConfig(t *testing.T) { + var endpoint ec2.VpcEndpoint + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_vpc_endpoint.second-private-s3", + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcEndpointDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccVpcEndpointWithoutRouteTableOrPolicyConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcEndpointExists("aws_vpc_endpoint.second-private-s3", &endpoint), + testAccCheckVpcEndpointPrefixListAvailable("aws_vpc_endpoint.second-private-s3"), + ), + }, + }, + }) +} + func testAccCheckVpcEndpointDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -139,26 +159,6 @@ func testAccCheckVpcEndpointPrefixListAvailable(n string) resource.TestCheckFunc } } -func TestAccAWSVpcEndpointWithoutRouteTableOrPolicyConfig(t *testing.T) { - var endpoint ec2.VpcEndpoint - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_vpc_endpoint.second-private-s3", - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcEndpointDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccVpcEndpointWithoutRouteTableOrPolicyConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckVpcEndpointExists("aws_vpc_endpoint.second-private-s3", &endpoint), - testAccCheckVpcEndpointPrefixListAvailable("aws_vpc_endpoint.second-private-s3"), - ), - }, - }, - }) -} - const testAccVpcEndpointWithRouteTableAndPolicyConfig = ` resource "aws_vpc" "foo" { cidr_block = "10.0.0.0/16"