Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support VPC sharing #6642

Merged
merged 11 commits into from
Dec 4, 2018
Merged

Support VPC sharing #6642

merged 11 commits into from
Dec 4, 2018

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 29, 2018

Fixes #6630.
Doing one resource at a time:

  • DHCP Options
  • Internet Gateway
  • NACL
  • Route Table
  • Subnet
  • VPC

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 29, 2018
@ewbankkit
Copy link
Contributor Author

ewbankkit commented Nov 29, 2018

Acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDefaultVpcDhcpOptions_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSDefaultVpcDhcpOptions_ -timeout 120m
=== RUN   TestAccAWSDefaultVpcDhcpOptions_basic
=== PAUSE TestAccAWSDefaultVpcDhcpOptions_basic
=== CONT  TestAccAWSDefaultVpcDhcpOptions_basic
--- PASS: TestAccAWSDefaultVpcDhcpOptions_basic (13.16s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	31.193s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDHCPOptions_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 3 -run=TestAccAWSDHCPOptions_ -timeout 120m
=== RUN   TestAccAWSDHCPOptions_importBasic
=== PAUSE TestAccAWSDHCPOptions_importBasic
=== RUN   TestAccAWSDHCPOptions_basic
=== PAUSE TestAccAWSDHCPOptions_basic
=== RUN   TestAccAWSDHCPOptions_deleteOptions
=== PAUSE TestAccAWSDHCPOptions_deleteOptions
=== CONT  TestAccAWSDHCPOptions_importBasic
=== CONT  TestAccAWSDHCPOptions_deleteOptions
=== CONT  TestAccAWSDHCPOptions_basic
--- PASS: TestAccAWSDHCPOptions_deleteOptions (7.81s)
--- PASS: TestAccAWSDHCPOptions_basic (10.19s)
--- PASS: TestAccAWSDHCPOptions_importBasic (11.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	11.776s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcDhcpOptions_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 3 -run=TestAccDataSourceAwsVpcDhcpOptions_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcDhcpOptions_basic
=== PAUSE TestAccDataSourceAwsVpcDhcpOptions_basic
=== RUN   TestAccDataSourceAwsVpcDhcpOptions_Filter
=== PAUSE TestAccDataSourceAwsVpcDhcpOptions_Filter
=== CONT  TestAccDataSourceAwsVpcDhcpOptions_basic
=== CONT  TestAccDataSourceAwsVpcDhcpOptions_Filter
--- PASS: TestAccDataSourceAwsVpcDhcpOptions_basic (13.54s)
--- PASS: TestAccDataSourceAwsVpcDhcpOptions_Filter (15.09s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	15.938s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSInternetGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 3 -run=TestAccAWSInternetGateway_ -timeout 120m
=== RUN   TestAccAWSInternetGateway_importBasic
=== PAUSE TestAccAWSInternetGateway_importBasic
=== RUN   TestAccAWSInternetGateway_basic
=== PAUSE TestAccAWSInternetGateway_basic
=== RUN   TestAccAWSInternetGateway_delete
=== PAUSE TestAccAWSInternetGateway_delete
=== RUN   TestAccAWSInternetGateway_tags
=== PAUSE TestAccAWSInternetGateway_tags
=== CONT  TestAccAWSInternetGateway_importBasic
=== CONT  TestAccAWSInternetGateway_tags
=== CONT  TestAccAWSInternetGateway_delete
=== CONT  TestAccAWSInternetGateway_basic
--- PASS: TestAccAWSInternetGateway_importBasic (27.38s)
--- PASS: TestAccAWSInternetGateway_delete (35.06s)
--- PASS: TestAccAWSInternetGateway_tags (35.83s)
--- PASS: TestAccAWSInternetGateway_basic (48.55s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	76.701s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsInternetGateway_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 3 -run=TestAccDataSourceAwsInternetGateway_ -timeout 120m
=== RUN   TestAccDataSourceAwsInternetGateway_typical
=== PAUSE TestAccDataSourceAwsInternetGateway_typical
=== CONT  TestAccDataSourceAwsInternetGateway_typical
--- PASS: TestAccDataSourceAwsInternetGateway_typical (46.58s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	47.402s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDefaultNetworkAcl_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 3 -run=TestAccAWSDefaultNetworkAcl_ -timeout 120m
=== RUN   TestAccAWSDefaultNetworkAcl_basic
=== PAUSE TestAccAWSDefaultNetworkAcl_basic
=== RUN   TestAccAWSDefaultNetworkAcl_basicIpv6Vpc
=== PAUSE TestAccAWSDefaultNetworkAcl_basicIpv6Vpc
=== RUN   TestAccAWSDefaultNetworkAcl_deny_ingress
=== PAUSE TestAccAWSDefaultNetworkAcl_deny_ingress
=== RUN   TestAccAWSDefaultNetworkAcl_withIpv6Ingress
=== PAUSE TestAccAWSDefaultNetworkAcl_withIpv6Ingress
=== RUN   TestAccAWSDefaultNetworkAcl_SubnetRemoval
=== PAUSE TestAccAWSDefaultNetworkAcl_SubnetRemoval
=== RUN   TestAccAWSDefaultNetworkAcl_SubnetReassign
=== PAUSE TestAccAWSDefaultNetworkAcl_SubnetReassign
=== CONT  TestAccAWSDefaultNetworkAcl_basic
=== CONT  TestAccAWSDefaultNetworkAcl_SubnetRemoval
=== CONT  TestAccAWSDefaultNetworkAcl_deny_ingress
=== CONT  TestAccAWSDefaultNetworkAcl_withIpv6Ingress
--- PASS: TestAccAWSDefaultNetworkAcl_basic (15.65s)
--- PASS: TestAccAWSDefaultNetworkAcl_deny_ingress (15.95s)
=== CONT  TestAccAWSDefaultNetworkAcl_SubnetReassign
--- PASS: TestAccAWSDefaultNetworkAcl_SubnetRemoval (34.24s)
=== CONT  TestAccAWSDefaultNetworkAcl_basicIpv6Vpc
--- PASS: TestAccAWSDefaultNetworkAcl_withIpv6Ingress (20.47s)
--- PASS: TestAccAWSDefaultNetworkAcl_basicIpv6Vpc (18.90s)
--- PASS: TestAccAWSDefaultNetworkAcl_SubnetReassign (44.04s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	60.762s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSNetworkAcl_EgressAndIngressRules'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSNetworkAcl_EgressAndIngressRules -timeout 120m
=== RUN   TestAccAWSNetworkAcl_EgressAndIngressRules
=== PAUSE TestAccAWSNetworkAcl_EgressAndIngressRules
=== CONT  TestAccAWSNetworkAcl_EgressAndIngressRules
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (37.54s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	38.478s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSNetworkAcl_OnlyIngressRules_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSNetworkAcl_OnlyIngressRules_ -timeout 120m
=== RUN   TestAccAWSNetworkAcl_OnlyIngressRules_basic
=== PAUSE TestAccAWSNetworkAcl_OnlyIngressRules_basic
=== RUN   TestAccAWSNetworkAcl_OnlyIngressRules_update
=== PAUSE TestAccAWSNetworkAcl_OnlyIngressRules_update
=== CONT  TestAccAWSNetworkAcl_OnlyIngressRules_basic
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (42.35s)
=== CONT  TestAccAWSNetworkAcl_OnlyIngressRules_update
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (42.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	104.008s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDefaultRouteTable_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSDefaultRouteTable_ -timeout 120m
=== RUN   TestAccAWSDefaultRouteTable_basic
=== PAUSE TestAccAWSDefaultRouteTable_basic
=== RUN   TestAccAWSDefaultRouteTable_swap
=== PAUSE TestAccAWSDefaultRouteTable_swap
=== RUN   TestAccAWSDefaultRouteTable_Route_TransitGatewayID
=== PAUSE TestAccAWSDefaultRouteTable_Route_TransitGatewayID
=== RUN   TestAccAWSDefaultRouteTable_vpc_endpoint
=== PAUSE TestAccAWSDefaultRouteTable_vpc_endpoint
=== CONT  TestAccAWSDefaultRouteTable_basic
=== CONT  TestAccAWSDefaultRouteTable_vpc_endpoint
--- PASS: TestAccAWSDefaultRouteTable_basic (34.02s)
--- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (47.58s)
=== CONT  TestAccAWSDefaultRouteTable_Route_TransitGatewayID
--- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (206.96s)
=== CONT  TestAccAWSDefaultRouteTable_swap
--- PASS: TestAccAWSDefaultRouteTable_swap (66.26s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	355.691s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRouteTable_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSRouteTable_basic -timeout 120m
=== RUN   TestAccAWSRouteTable_basic
=== PAUSE TestAccAWSRouteTable_basic
=== CONT  TestAccAWSRouteTable_basic
--- PASS: TestAccAWSRouteTable_basic (77.61s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	78.544s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsRouteTable_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccDataSourceAwsRouteTable_ -timeout 120m
=== RUN   TestAccDataSourceAwsRouteTable_basic
=== PAUSE TestAccDataSourceAwsRouteTable_basic
=== RUN   TestAccDataSourceAwsRouteTable_main
=== PAUSE TestAccDataSourceAwsRouteTable_main
=== CONT  TestAccDataSourceAwsRouteTable_basic
--- PASS: TestAccDataSourceAwsRouteTable_basic (71.90s)
=== CONT  TestAccDataSourceAwsRouteTable_main
--- PASS: TestAccDataSourceAwsRouteTable_main (22.57s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	95.381s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDefaultSubnet_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSDefaultSubnet_ -timeout 120m
=== RUN   TestAccAWSDefaultSubnet_basic
=== PAUSE TestAccAWSDefaultSubnet_basic
=== RUN   TestAccAWSDefaultSubnet_publicIp
=== PAUSE TestAccAWSDefaultSubnet_publicIp
=== CONT  TestAccAWSDefaultSubnet_basic
=== CONT  TestAccAWSDefaultSubnet_publicIp
--- PASS: TestAccAWSDefaultSubnet_basic (14.36s)
--- PASS: TestAccAWSDefaultSubnet_publicIp (25.65s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	40.924s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSubnet_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSSubnet_basic -timeout 120m
=== RUN   TestAccAWSSubnet_basic
=== PAUSE TestAccAWSSubnet_basic
=== CONT  TestAccAWSSubnet_basic
--- PASS: TestAccAWSSubnet_basic (54.27s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	55.286s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsSubnet_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccDataSourceAwsSubnet_ -timeout 120m
=== RUN   TestAccDataSourceAwsSubnet_basic
=== PAUSE TestAccDataSourceAwsSubnet_basic
=== RUN   TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
=== PAUSE TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
=== RUN   TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
=== PAUSE TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
=== CONT  TestAccDataSourceAwsSubnet_basic
--- PASS: TestAccDataSourceAwsSubnet_basic (35.37s)
=== CONT  TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock (59.12s)
=== CONT  TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter (114.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	209.611s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSDefaultVpc_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSDefaultVpc_ -timeout 120m
=== RUN   TestAccAWSDefaultVpc_basic
=== PAUSE TestAccAWSDefaultVpc_basic
=== CONT  TestAccAWSDefaultVpc_basic
--- PASS: TestAccAWSDefaultVpc_basic (53.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	54.659s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpc_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccAWSVpc_basic -timeout 120m
=== RUN   TestAccAWSVpc_basic
=== PAUSE TestAccAWSVpc_basic
=== CONT  TestAccAWSVpc_basic
--- PASS: TestAccAWSVpc_basic (54.33s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	55.258s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpc_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel  1 -run=TestAccDataSourceAwsVpc_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpc_basic
=== PAUSE TestAccDataSourceAwsVpc_basic
=== RUN   TestAccDataSourceAwsVpc_ipv6Associated
=== PAUSE TestAccDataSourceAwsVpc_ipv6Associated
=== RUN   TestAccDataSourceAwsVpc_multipleCidr
=== PAUSE TestAccDataSourceAwsVpc_multipleCidr
=== CONT  TestAccDataSourceAwsVpc_basic
=== CONT  TestAccDataSourceAwsVpc_multipleCidr
--- PASS: TestAccDataSourceAwsVpc_basic (47.87s)
--- PASS: TestAccDataSourceAwsVpc_multipleCidr (86.71s)
=== CONT  TestAccDataSourceAwsVpc_ipv6Associated
--- PASS: TestAccDataSourceAwsVpc_ipv6Associated (53.31s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	188.765s

@ghost ghost added size/M Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 29, 2018
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Nov 29, 2018
@ewbankkit ewbankkit changed the title [WIP] Support VPC sharing Support VPC sharing Nov 29, 2018
@ewbankkit
Copy link
Contributor Author

Removed WIP. Ready for review.

@ewbankkit
Copy link
Contributor Author

Back to WIP until I add support for AZ ID to Subnet creation; See #6546 (comment).

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @ewbankkit! Some minor testing/documentation updates then we'll double check the acceptance testing and 🚢 this. 😄

@@ -53,6 +53,14 @@ func testAccDataSourceAwsInternetGatewayCheck(name string) resource.TestCheckFun
)
}

if attr["owner_id"] != igwRs.Primary.Attributes["owner_id"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily for this PR, but we can use resource.TestCheckResourceAttrPair() instead of this custom logic. I'm not opposed to starting with just these new attributes to start that technical debt cleanup.

Same applies below to other similar logic. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I added that function back in Feb 2017 😄. OK, I'll use it here.

Copy link
Contributor Author

@ewbankkit ewbankkit Nov 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar changes to

  • data_source_aws_route_table_test.go
  • data_source_aws_subnet_test.go
  • data_source_aws_vpc_test.go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

aws/data_source_aws_subnet.go Show resolved Hide resolved
@@ -38,6 +38,7 @@ func TestAccAWSDefaultNetworkAcl_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccGetAWSDefaultNetworkAcl("aws_default_network_acl.default", &networkAcl),
testAccCheckAWSDefaultACLAttributes(&networkAcl, []*ec2.NetworkAclEntry{}, 0, 2),
resource.TestCheckResourceAttrSet("aws_default_network_acl.default", "owner_id"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of allowing any value here (e.g. d.Set("owner_id", "not-an-account-id-attribute")), we can verify this via the following recent addition to the acceptance testing utility functions:

Suggested change
resource.TestCheckResourceAttrSet("aws_default_network_acl.default", "owner_id"),
testAccCheckResourceAttrAccountID("aws_default_network_acl.default", "owner_id"),

The same applies to other similar new resource.TestCheckResourceAttrSet() calls below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will do. Good to know.

Copy link
Contributor Author

@ewbankkit ewbankkit Nov 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar changes to

  • resource_aws_default_route_table_test.go
  • resource_aws_default_subnet_test.go
  • resource_aws_default_vpc_dhcp_options_test.go
  • resource_aws_ec2_transit_gateway_test.go
  • resource_aws_internet_gateway_test.go
  • resource_aws_network_acl_test.go
  • resource_aws_route_table_test.go
  • resource_aws_subnet_test.go
  • resource_aws_vpc_dhcp_options_test.go
  • resource_aws_default_vpc_test.go
  • resource_aws_vpc_test.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

aws/resource_aws_default_vpc_dhcp_options.go Show resolved Hide resolved
aws/resource_aws_default_vpc_test.go Show resolved Hide resolved
return resourceAwsInternetGatewayAttach(d, meta)
err = resourceAwsInternetGatewayAttach(d, meta)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to return some context about when this error occurs since the conn.AttachInternetGateway call does not, e.g.

Suggested change
return err
return fmt.Errorf("error attaching EC2 Internet Gateway (%s): %s", d.Id(), err)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. waiting-response Maintainers are waiting on response from community or contributor. labels Nov 30, 2018
@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Dec 2, 2018
@bflad
Copy link
Contributor

bflad commented Dec 2, 2018

@ewbankkit do you need to push up your changes or is GitHub being weird? 😄 Thanks so much.

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Dec 2, 2018
@ghost ghost removed the size/L Managed by automation to categorize the size of a PR. label Dec 2, 2018
@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Dec 2, 2018
@ewbankkit
Copy link
Contributor Author

@bflad No, that was me just making a note of progress as I made the review changes.
I've now pushed the changes after the code review and additional the changes to support AvailabilityZoneId for subnets which is necessary for VPC sharing. The equivalent change for creating default subnets will have to wait until #4957 is done.
Acceptance tests for the subnet changes:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSSubnet_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 1 -run=TestAccAWSSubnet_ -timeout 120m
=== RUN   TestAccAWSSubnet_importBasic
=== PAUSE TestAccAWSSubnet_importBasic
=== RUN   TestAccAWSSubnet_basic
=== PAUSE TestAccAWSSubnet_basic
=== RUN   TestAccAWSSubnet_ipv6
=== PAUSE TestAccAWSSubnet_ipv6
=== RUN   TestAccAWSSubnet_enableIpv6
=== PAUSE TestAccAWSSubnet_enableIpv6
=== RUN   TestAccAWSSubnet_availabilityZoneId
=== PAUSE TestAccAWSSubnet_availabilityZoneId
=== CONT  TestAccAWSSubnet_importBasic
--- PASS: TestAccAWSSubnet_importBasic (30.49s)
=== CONT  TestAccAWSSubnet_availabilityZoneId
--- PASS: TestAccAWSSubnet_availabilityZoneId (27.82s)
=== CONT  TestAccAWSSubnet_enableIpv6
--- PASS: TestAccAWSSubnet_enableIpv6 (47.20s)
=== CONT  TestAccAWSSubnet_ipv6
--- PASS: TestAccAWSSubnet_ipv6 (75.59s)
=== CONT  TestAccAWSSubnet_basic
--- PASS: TestAccAWSSubnet_basic (29.05s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	210.172s

I made changes to the data source tests to avoid dependence on a particular region and ran in us-east-2 to verify:

$ AWS_DEFAULT_REGION=us-east-2 make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsSubnet_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 1 -run=TestAccDataSourceAwsSubnet_ -timeout 120m
=== RUN   TestAccDataSourceAwsSubnet_basic
=== PAUSE TestAccDataSourceAwsSubnet_basic
=== RUN   TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
=== PAUSE TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
=== RUN   TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
=== PAUSE TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
=== CONT  TestAccDataSourceAwsSubnet_basic
--- PASS: TestAccDataSourceAwsSubnet_basic (17.56s)
=== CONT  TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock (28.15s)
=== CONT  TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter (28.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	73.726s

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Dec 2, 2018
@bflad bflad added this to the v1.51.0 milestone Dec 4, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ewbankkit! 🚀

--- PASS: TestAccAWSDefaultNetworkAcl_basic (26.50s)
--- PASS: TestAccAWSDefaultNetworkAcl_basicIpv6Vpc (20.00s)
--- PASS: TestAccAWSDefaultNetworkAcl_deny_ingress (24.12s)
--- PASS: TestAccAWSDefaultNetworkAcl_SubnetReassign (60.47s)
--- PASS: TestAccAWSDefaultNetworkAcl_SubnetRemoval (40.55s)
--- PASS: TestAccAWSDefaultNetworkAcl_withIpv6Ingress (20.61s)
--- PASS: TestAccAWSDefaultRouteTable_basic (33.16s)
--- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (259.91s)
--- PASS: TestAccAWSDefaultRouteTable_swap (58.03s)
--- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (221.27s)
--- PASS: TestAccAWSDefaultSubnet_basic (15.55s)
--- PASS: TestAccAWSDefaultSubnet_publicIp (24.58s)
--- PASS: TestAccAWSDefaultVpc_basic (14.43s)
--- PASS: TestAccAWSDHCPOptions_basic (5.93s)
--- PASS: TestAccAWSDHCPOptions_deleteOptions (8.47s)
--- PASS: TestAccAWSDHCPOptions_importBasic (9.19s)
--- PASS: TestAccAWSEc2TransitGateway_basic (155.44s)
--- PASS: TestAccAWSInternetGateway_basic (62.34s)
--- PASS: TestAccAWSInternetGateway_delete (34.37s)
--- PASS: TestAccAWSInternetGateway_importBasic (34.68s)
--- PASS: TestAccAWSInternetGateway_tags (36.89s)
--- PASS: TestAccAWSNetworkAcl_CaseSensitivityNoChanges (44.72s)
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (14.07s)
--- PASS: TestAccAWSNetworkAcl_espProtocol (20.57s)
--- PASS: TestAccAWSNetworkAcl_importBasic (38.67s)
--- PASS: TestAccAWSNetworkAcl_ipv6ICMPRules (17.09s)
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (29.18s)
--- PASS: TestAccAWSNetworkAcl_ipv6VpcRules (33.28s)
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (27.02s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (28.47s)
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (27.09s)
--- PASS: TestAccAWSNetworkAcl_SubnetChange (63.63s)
--- PASS: TestAccAWSNetworkAcl_Subnets (55.55s)
--- PASS: TestAccAWSNetworkAcl_SubnetsDelete (51.88s)
--- PASS: TestAccAWSRouteTable_basic (48.57s)
--- PASS: TestAccAWSRouteTable_complex (181.18s)
--- PASS: TestAccAWSRouteTable_importBasic (59.67s)
--- PASS: TestAccAWSRouteTable_instance (120.44s)
--- PASS: TestAccAWSRouteTable_ipv6 (29.64s)
--- PASS: TestAccAWSRouteTable_panicEmptyRoute (10.50s)
--- PASS: TestAccAWSRouteTable_Route_TransitGatewayID (210.58s)
--- PASS: TestAccAWSRouteTable_tags (40.26s)
--- PASS: TestAccAWSRouteTable_vgwRoutePropagation (32.20s)
--- PASS: TestAccAWSRouteTable_vpcPeering (107.47s)
--- PASS: TestAccAWSSubnet_availabilityZoneId (22.81s)
--- PASS: TestAccAWSSubnet_basic (14.45s)
--- PASS: TestAccAWSSubnet_enableIpv6 (65.36s)
--- PASS: TestAccAWSSubnet_importBasic (20.26s)
--- PASS: TestAccAWSSubnet_ipv6 (76.85s)
--- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (58.69s)
--- PASS: TestAccAWSVpc_basic (43.60s)
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (24.37s)
--- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (10.73s)
--- PASS: TestAccAWSVpc_classiclinkOptionSet (13.38s)
--- PASS: TestAccAWSVpc_coreMismatchedDiffs (14.51s)
--- PASS: TestAccAWSVpc_DisabledDnsSupport (16.35s)
--- PASS: TestAccAWSVpc_tags (48.68s)
--- PASS: TestAccAWSVpc_Tenancy (52.53s)
--- PASS: TestAccAWSVpc_update (38.37s)
--- PASS: TestAccDataSourceAwsInternetGateway_typical (51.84s)
--- PASS: TestAccDataSourceAwsRouteTable_basic (42.32s)
--- PASS: TestAccDataSourceAwsRouteTable_main (19.59s)
--- PASS: TestAccDataSourceAwsSubnet_basic (30.94s)
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock (26.86s)
--- PASS: TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter (51.08s)
--- PASS: TestAccDataSourceAwsVpc_basic (63.38s)
--- PASS: TestAccDataSourceAwsVpc_ipv6Associated (25.54s)
--- PASS: TestAccDataSourceAwsVpc_multipleCidr (30.77s)
--- PASS: TestAccDataSourceAwsVpcDhcpOptions_basic (31.09s)
--- PASS: TestAccDataSourceAwsVpcDhcpOptions_Filter (26.59s)

@bflad bflad merged commit d897abe into hashicorp:master Dec 4, 2018
bflad added a commit that referenced this pull request Dec 4, 2018
@ewbankkit ewbankkit deleted the issue-6630 branch December 4, 2018 11:22
@bflad
Copy link
Contributor

bflad commented Dec 5, 2018

This has been released in version 1.51.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Support VPC sharing
2 participants