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

Tagging for VPC Endpoints and VPC Endpoint Services #8674

Merged
merged 7 commits into from
Jun 20, 2019

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented May 17, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #8625.

Release note for CHANGELOG:

ENHANCEMENTS:

* data-source/aws_vpc_endpoint: New attributes `owner_id` and `tags` (https://github.com/terraform-providers/terraform-provider-aws/issues/8625).
* data-source/aws_vpc_endpoint_service: New attributes `service_id` and `tags` (https://github.com/terraform-providers/terraform-provider-aws/issues/8625).
* resource/aws_vpc_endpoint: New argument `tags` (https://github.com/terraform-providers/terraform-provider-aws/issues/8625). New attribute `owner_id`.
* resource/aws_vpc_endpoint_service: New argument `tags` (https://github.com/terraform-providers/terraform-provider-aws/issues/8625).

Acceptance tests:

d/aws_vpc_endpoint_service

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcEndpointService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccDataSourceAwsVpcEndpointService_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcEndpointService_gateway
=== PAUSE TestAccDataSourceAwsVpcEndpointService_gateway
=== RUN   TestAccDataSourceAwsVpcEndpointService_interface
=== PAUSE TestAccDataSourceAwsVpcEndpointService_interface
=== RUN   TestAccDataSourceAwsVpcEndpointService_custom
=== PAUSE TestAccDataSourceAwsVpcEndpointService_custom
=== CONT  TestAccDataSourceAwsVpcEndpointService_gateway
=== CONT  TestAccDataSourceAwsVpcEndpointService_custom
--- PASS: TestAccDataSourceAwsVpcEndpointService_gateway (16.44s)
=== CONT  TestAccDataSourceAwsVpcEndpointService_interface
--- PASS: TestAccDataSourceAwsVpcEndpointService_interface (16.06s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_custom (296.32s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	296.359s

r/aws_vpc_endpoint_service

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcEndpointService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccAWSVpcEndpointService_ -timeout 120m
=== RUN   TestAccAWSVpcEndpointService_basic
=== PAUSE TestAccAWSVpcEndpointService_basic
=== RUN   TestAccAWSVpcEndpointService_removed
=== PAUSE TestAccAWSVpcEndpointService_removed
=== CONT  TestAccAWSVpcEndpointService_basic
=== CONT  TestAccAWSVpcEndpointService_removed
--- PASS: TestAccAWSVpcEndpointService_removed (278.73s)
--- PASS: TestAccAWSVpcEndpointService_basic (506.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	506.809s

d/aws_vpc_endpoint

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccDataSourceAwsVpcEndpoint_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== RUN   TestAccDataSourceAwsVpcEndpoint_byId
=== PAUSE TestAccDataSourceAwsVpcEndpoint_byId
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== RUN   TestAccDataSourceAwsVpcEndpoint_interface
=== PAUSE TestAccDataSourceAwsVpcEndpoint_interface
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== CONT  TestAccDataSourceAwsVpcEndpoint_interface
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayBasic (44.82s)
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags (49.34s)
=== CONT  TestAccDataSourceAwsVpcEndpoint_byId
--- PASS: TestAccDataSourceAwsVpcEndpoint_byId (44.74s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_interface (156.06s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	156.076s

r/aws_vpc_endpoint

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccAWSVpcEndpoint_ -timeout 120m
=== RUN   TestAccAWSVpcEndpoint_gatewayBasic
=== PAUSE TestAccAWSVpcEndpoint_gatewayBasic
=== RUN   TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== PAUSE TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== RUN   TestAccAWSVpcEndpoint_gatewayPolicy
=== PAUSE TestAccAWSVpcEndpoint_gatewayPolicy
=== RUN   TestAccAWSVpcEndpoint_interfaceBasic
=== PAUSE TestAccAWSVpcEndpoint_interfaceBasic
=== RUN   TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== PAUSE TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== RUN   TestAccAWSVpcEndpoint_interfaceNonAWSService
=== PAUSE TestAccAWSVpcEndpoint_interfaceNonAWSService
=== RUN   TestAccAWSVpcEndpoint_removed
=== PAUSE TestAccAWSVpcEndpoint_removed
=== CONT  TestAccAWSVpcEndpoint_gatewayBasic
=== CONT  TestAccAWSVpcEndpoint_removed
--- PASS: TestAccAWSVpcEndpoint_removed (35.95s)
=== CONT  TestAccAWSVpcEndpoint_interfaceNonAWSService
--- PASS: TestAccAWSVpcEndpoint_gatewayBasic (43.26s)
=== CONT  TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
--- PASS: TestAccAWSVpcEndpoint_interfaceNonAWSService (326.57s)
=== CONT  TestAccAWSVpcEndpoint_interfaceBasic
--- PASS: TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup (356.00s)
=== CONT  TestAccAWSVpcEndpoint_gatewayPolicy
--- PASS: TestAccAWSVpcEndpoint_interfaceBasic (65.16s)
=== CONT  TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
--- PASS: TestAccAWSVpcEndpoint_gatewayPolicy (72.60s)
--- PASS: TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags (83.03s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	510.766s

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

ewbankkit commented May 17, 2019

This PR includes the changes from #8396.
I can rebase if that PR is merged first.

@ewbankkit
Copy link
Contributor Author

Rebased to remove conflicts and also ran terrafmt on new changes.

Acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcEndpointService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 4 -run=TestAccAWSVpcEndpointService_ -timeout 120m
=== RUN   TestAccAWSVpcEndpointService_basic
=== PAUSE TestAccAWSVpcEndpointService_basic
=== RUN   TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags
=== PAUSE TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags
=== RUN   TestAccAWSVpcEndpointService_removed
=== PAUSE TestAccAWSVpcEndpointService_removed
=== CONT  TestAccAWSVpcEndpointService_basic
=== CONT  TestAccAWSVpcEndpointService_removed
=== CONT  TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags
--- PASS: TestAccAWSVpcEndpointService_removed (269.21s)
--- PASS: TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags (301.90s)
--- PASS: TestAccAWSVpcEndpointService_basic (305.89s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	305.956s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcEndpointService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 4 -run=TestAccDataSourceAwsVpcEndpointService_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcEndpointService_gateway
=== PAUSE TestAccDataSourceAwsVpcEndpointService_gateway
=== RUN   TestAccDataSourceAwsVpcEndpointService_interface
=== PAUSE TestAccDataSourceAwsVpcEndpointService_interface
=== RUN   TestAccDataSourceAwsVpcEndpointService_custom
=== PAUSE TestAccDataSourceAwsVpcEndpointService_custom
=== CONT  TestAccDataSourceAwsVpcEndpointService_gateway
=== CONT  TestAccDataSourceAwsVpcEndpointService_custom
=== CONT  TestAccDataSourceAwsVpcEndpointService_interface
--- PASS: TestAccDataSourceAwsVpcEndpointService_interface (16.57s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_gateway (16.63s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_custom (268.12s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	268.182s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 4 -run=TestAccAWSVpcEndpoint_ -timeout 120m
=== RUN   TestAccAWSVpcEndpoint_gatewayBasic
=== PAUSE TestAccAWSVpcEndpoint_gatewayBasic
=== RUN   TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== PAUSE TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== RUN   TestAccAWSVpcEndpoint_gatewayPolicy
=== PAUSE TestAccAWSVpcEndpoint_gatewayPolicy
=== RUN   TestAccAWSVpcEndpoint_interfaceBasic
=== PAUSE TestAccAWSVpcEndpoint_interfaceBasic
=== RUN   TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== PAUSE TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== RUN   TestAccAWSVpcEndpoint_interfaceNonAWSService
=== PAUSE TestAccAWSVpcEndpoint_interfaceNonAWSService
=== RUN   TestAccAWSVpcEndpoint_removed
=== PAUSE TestAccAWSVpcEndpoint_removed
=== CONT  TestAccAWSVpcEndpoint_gatewayBasic
=== CONT  TestAccAWSVpcEndpoint_interfaceNonAWSService
=== CONT  TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== CONT  TestAccAWSVpcEndpoint_interfaceBasic
--- PASS: TestAccAWSVpcEndpoint_gatewayBasic (45.08s)
=== CONT  TestAccAWSVpcEndpoint_removed
--- PASS: TestAccAWSVpcEndpoint_removed (38.40s)
=== CONT  TestAccAWSVpcEndpoint_gatewayPolicy
--- PASS: TestAccAWSVpcEndpoint_interfaceBasic (120.49s)
=== CONT  TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
--- PASS: TestAccAWSVpcEndpoint_gatewayPolicy (74.26s)
--- PASS: TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags (84.93s)
--- PASS: TestAccAWSVpcEndpoint_interfaceNonAWSService (305.87s)
--- PASS: TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup (433.96s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	434.026s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 4 -run=TestAccDataSourceAwsVpcEndpoint_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== RUN   TestAccDataSourceAwsVpcEndpoint_byId
=== PAUSE TestAccDataSourceAwsVpcEndpoint_byId
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== RUN   TestAccDataSourceAwsVpcEndpoint_interface
=== PAUSE TestAccDataSourceAwsVpcEndpoint_interface
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== CONT  TestAccDataSourceAwsVpcEndpoint_byId
=== CONT  TestAccDataSourceAwsVpcEndpoint_interface
--- PASS: TestAccDataSourceAwsVpcEndpoint_byId (47.10s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayBasic (47.13s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags (51.75s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_interface (179.89s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	179.950s

@ewbankkit
Copy link
Contributor Author

Rebased to include AWS SDK v1.19.46 via #8864 to add VPC Endpoint owner_id attribute.

Relevant acceptance tests:

$  make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccDataSourceAwsVpcEndpoint_ -timeout 120m
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== RUN   TestAccDataSourceAwsVpcEndpoint_byId
=== PAUSE TestAccDataSourceAwsVpcEndpoint_byId
=== RUN   TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== PAUSE TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
=== RUN   TestAccDataSourceAwsVpcEndpoint_interface
=== PAUSE TestAccDataSourceAwsVpcEndpoint_interface
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayBasic
=== CONT  TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayBasic (50.11s)
=== CONT  TestAccDataSourceAwsVpcEndpoint_interface
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags (54.49s)
=== CONT  TestAccDataSourceAwsVpcEndpoint_byId
--- PASS: TestAccDataSourceAwsVpcEndpoint_byId (49.19s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_interface (183.41s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	233.587s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcEndpoint_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 2 -run=TestAccAWSVpcEndpoint_ -timeout 120m
=== RUN   TestAccAWSVpcEndpoint_gatewayBasic
=== PAUSE TestAccAWSVpcEndpoint_gatewayBasic
=== RUN   TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== PAUSE TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
=== RUN   TestAccAWSVpcEndpoint_gatewayPolicy
=== PAUSE TestAccAWSVpcEndpoint_gatewayPolicy
=== RUN   TestAccAWSVpcEndpoint_interfaceBasic
=== PAUSE TestAccAWSVpcEndpoint_interfaceBasic
=== RUN   TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== PAUSE TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
=== RUN   TestAccAWSVpcEndpoint_interfaceNonAWSService
=== PAUSE TestAccAWSVpcEndpoint_interfaceNonAWSService
=== RUN   TestAccAWSVpcEndpoint_removed
=== PAUSE TestAccAWSVpcEndpoint_removed
=== CONT  TestAccAWSVpcEndpoint_gatewayBasic
=== CONT  TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup
--- PASS: TestAccAWSVpcEndpoint_gatewayBasic (48.29s)
=== CONT  TestAccAWSVpcEndpoint_removed
--- PASS: TestAccAWSVpcEndpoint_removed (40.55s)
=== CONT  TestAccAWSVpcEndpoint_interfaceNonAWSService
--- PASS: TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup (364.45s)
=== CONT  TestAccAWSVpcEndpoint_interfaceBasic
--- PASS: TestAccAWSVpcEndpoint_interfaceNonAWSService (322.86s)
=== CONT  TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags
--- PASS: TestAccAWSVpcEndpoint_interfaceBasic (112.29s)
=== CONT  TestAccAWSVpcEndpoint_gatewayPolicy
--- PASS: TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags (88.89s)
--- PASS: TestAccAWSVpcEndpoint_gatewayPolicy (78.53s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	555.341s

@pleochroic
Copy link

Hi,
In which Terraform version are you going to release it?

Best wishes,
Pav

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 20, 2019
@bflad bflad added this to the v2.16.0 milestone Jun 20, 2019
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.

Hey @ewbankkit 👋 Thanks so much for the enhancements and refactoring here. Apologies for the delayed review just due to the PR complexity. Looks good! 🚀

Output from acceptance testing:

--- PASS: TestAccAWSVpcEndpoint_gatewayBasic (36.83s)
--- PASS: TestAccAWSVpcEndpoint_gatewayPolicy (51.20s)
--- PASS: TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags (93.38s)
--- PASS: TestAccAWSVpcEndpoint_interfaceBasic (43.97s)
--- PASS: TestAccAWSVpcEndpoint_interfaceNonAWSService (254.12s)
--- PASS: TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup (309.53s)
--- PASS: TestAccAWSVpcEndpoint_removed (16.71s)
--- PASS: TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags (262.74s)
--- PASS: TestAccAWSVpcEndpointService_basic (267.23s)
--- PASS: TestAccAWSVpcEndpointService_removed (282.88s)
--- PASS: TestAccAWSVpcEndpointServiceAllowedPrincipal_basic (267.97s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_byId (34.37s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayBasic (29.05s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTableAndTags (39.51s)
--- PASS: TestAccDataSourceAwsVpcEndpoint_interface (166.87s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_custom (229.11s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_gateway (20.79s)
--- PASS: TestAccDataSourceAwsVpcEndpointService_interface (19.51s)

@bflad bflad merged commit 4e8515e into hashicorp:master Jun 20, 2019
bflad added a commit that referenced this pull request Jun 20, 2019
@ewbankkit ewbankkit deleted the issue-8625 branch June 20, 2019 11:33
@bflad
Copy link
Contributor

bflad commented Jun 20, 2019

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

@ghost
Copy link

ghost commented Nov 3, 2019

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 Nov 3, 2019
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/XXL 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.

Support Tagging for VPC Endpoints (Gateway Endpoints, Interface Endpoints and Endpoint Services)
3 participants