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

Direct Connect virtual interfaces: Tag-on-create and validate type during import #9572

Merged
merged 6 commits into from
Nov 25, 2019

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jul 31, 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

Closes #8843.
Relates #9172.

Release note for CHANGELOG:

resource/aws_dx_private_virtual_interface: Add support for tag-on-create and verify virtual interface type during terraform import

Output from acceptance testing:

$ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxPrivateVirtualInterface_Tags
=== PAUSE TestAccAwsDxPrivateVirtualInterface_Tags
=== RUN   TestAccAwsDxPrivateVirtualInterface_DxGateway
=== PAUSE TestAccAwsDxPrivateVirtualInterface_DxGateway
=== CONT  TestAccAwsDxPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxPrivateVirtualInterface_Tags
=== CONT  TestAccAwsDxPrivateVirtualInterface_DxGateway
--- PASS: TestAccAwsDxPrivateVirtualInterface_Tags (561.40s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_DxGateway (572.89s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_basic (882.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	882.761s
$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags (453.53s)
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (455.55s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	455.678s
$ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPublicVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxPublicVirtualInterface_basic
=== RUN   TestAccAwsDxPublicVirtualInterface_Tags
=== PAUSE TestAccAwsDxPublicVirtualInterface_Tags
=== CONT  TestAccAwsDxPublicVirtualInterface_basic
=== CONT  TestAccAwsDxPublicVirtualInterface_Tags
--- PASS: TestAccAwsDxPublicVirtualInterface_basic (38.84s)
--- PASS: TestAccAwsDxPublicVirtualInterface_Tags (50.85s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	50.906s
$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPublicVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_basic (50.48s)
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_AccepterTags (59.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.795s

@ewbankkit ewbankkit requested a review from a team July 31, 2019 16:36
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. service/directconnect Issues and PRs that pertain to the directconnect service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 31, 2019
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Aug 1, 2019
@ewbankkit ewbankkit changed the title [WIP] Direct Connect virtual interfaces: Tag-on-create and validate type during import Direct Connect virtual interfaces: Tag-on-create and validate type during import Aug 2, 2019
@ewbankkit
Copy link
Contributor Author

Removing WIP.

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 2, 2019
@bflad
Copy link
Contributor

bflad commented Aug 2, 2019

Thanks for all the cleanup/refactoring here, @ewbankkit 💯 Just a note that in the future its easier for the maintainers to review the refactoring work when those are broken into their own separate commits (e.g. alphabetized schema attributes). The maintainers are also trying to get better about this themselves! Please don't worry about doing anything with this pull request though. 😄

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 again for this. Overall its pretty good, just a few things below.

Similar to the other Direct Connect acceptance testing that requires an active DX connection, the maintainers here do not currently have the ability to test this themselves, so this will require another community member to run and show passing testing results.

Relatedly, we would love to have a working relationship with the Direct Connect service team so we don't need to slow down this process. If you (or anyone else reading this) are willing, please reach out to your AWS account management team about talking to HashiCorp through the Amazon Partner Network. Thanks! 😄

@ewbankkit
Copy link
Contributor Author

OK, common Exists and Destroy routines added to new file dx_vif_test.go.
Acceptance tests:

$ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxPrivateVirtualInterface_Tags
=== PAUSE TestAccAwsDxPrivateVirtualInterface_Tags
=== RUN   TestAccAwsDxPrivateVirtualInterface_DxGateway
=== PAUSE TestAccAwsDxPrivateVirtualInterface_DxGateway
=== CONT  TestAccAwsDxPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxPrivateVirtualInterface_Tags
=== CONT  TestAccAwsDxPrivateVirtualInterface_DxGateway
--- PASS: TestAccAwsDxPrivateVirtualInterface_DxGateway (647.50s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_Tags (647.89s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_basic (970.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	970.098s
$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags (459.81s)
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (460.79s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	460.937s
$ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPublicVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxPublicVirtualInterface_basic
=== RUN   TestAccAwsDxPublicVirtualInterface_Tags
=== PAUSE TestAccAwsDxPublicVirtualInterface_Tags
=== CONT  TestAccAwsDxPublicVirtualInterface_basic
=== CONT  TestAccAwsDxPublicVirtualInterface_Tags
--- PASS: TestAccAwsDxPublicVirtualInterface_basic (35.75s)
--- PASS: TestAccAwsDxPublicVirtualInterface_Tags (45.57s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	45.663s
$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPublicVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_basic (50.09s)
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_AccepterTags (59.12s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.206s

I'll use the same common functions in #8522 and #8523.

ewbankkit pushed a commit to ewbankkit/terraform-provider-aws that referenced this pull request Aug 2, 2019
ewbankkit pushed a commit to ewbankkit/terraform-provider-aws that referenced this pull request Oct 4, 2019
Kit Ewbank and others added 6 commits October 4, 2019 17:11
… verify virtual interface type during import.
…rtual_interface_accepter: Add support for tag-on-create and verify virtual interface type during import.
…verify virtual interface type during import.
…ual_interface_accepter: Add support for tag-on-create and verify virtual interface type during import.
@ewbankkit
Copy link
Contributor Author

Rebased to fix conflicts and did the Terraform Plugin SDK migration for the new source file.

@ewbankkit
Copy link
Contributor Author

@ryno75 Will you be able to verify?
Thanks.

@devonbleak
Copy link
Contributor

Confirming acceptance tests:

$ DX_CONNECTION_ID=dxcon-redacted make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxPrivateVirtualInterface_Tags
=== PAUSE TestAccAwsDxPrivateVirtualInterface_Tags
=== RUN   TestAccAwsDxPrivateVirtualInterface_DxGateway
=== PAUSE TestAccAwsDxPrivateVirtualInterface_DxGateway
=== CONT  TestAccAwsDxPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxPrivateVirtualInterface_DxGateway
=== CONT  TestAccAwsDxPrivateVirtualInterface_Tags
--- PASS: TestAccAwsDxPrivateVirtualInterface_Tags (361.95s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_basic (670.75s)
--- PASS: TestAccAwsDxPrivateVirtualInterface_DxGateway (680.65s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       682.965s

$ DX_CONNECTION_ID=dxcon-redacted make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (663.62s)
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_AccepterTags (968.99s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       970.164s

$ DX_CONNECTION_ID=dxcon-redacted make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxPublicVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxPublicVirtualInterface_basic
=== RUN   TestAccAwsDxPublicVirtualInterface_Tags
=== PAUSE TestAccAwsDxPublicVirtualInterface_Tags
=== CONT  TestAccAwsDxPublicVirtualInterface_basic
=== CONT  TestAccAwsDxPublicVirtualInterface_Tags
--- PASS: TestAccAwsDxPublicVirtualInterface_basic (221.79s)
--- PASS: TestAccAwsDxPublicVirtualInterface_Tags (337.84s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       338.907s

$ DX_CONNECTION_ID=dxcon-redacted make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPublicVirtualInterface' 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxHostedPublicVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_basic
=== RUN   TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== PAUSE TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_basic
=== CONT  TestAccAwsDxHostedPublicVirtualInterface_AccepterTags
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_basic (241.19s)
--- PASS: TestAccAwsDxHostedPublicVirtualInterface_AccepterTags (394.49s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       395.606s

@ewbankkit
Copy link
Contributor Author

@devonbleak Many thanks for the independent verification.
@bflad Any chance of merge? Thanks.

@bflad bflad added this to the v2.40.0 milestone Nov 25, 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.

This looks good, thanks @ewbankkit the updates and @devonbleak for the testing assistance! 🚀

Approving per our community testing strategy for Direct Connect resources after code review. 👍

@bflad bflad merged commit 8225a62 into hashicorp:master Nov 25, 2019
bflad added a commit that referenced this pull request Nov 25, 2019
@ghost
Copy link

ghost commented Nov 27, 2019

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ewbankkit ewbankkit deleted the issues-8443-9172 branch November 27, 2019 00:35
@ghost
Copy link

ghost commented Mar 29, 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 Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/directconnect Issues and PRs that pertain to the directconnect 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.

Ensure correct VIF type during import of Direct Connect Virtual Interfaces
3 participants