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

New data sources 'aws_dx_location' and 'aws_dx_locations' #9735

Merged
merged 21 commits into from
Aug 25, 2021

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Aug 12, 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 #9708.

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_disappears
=== PAUSE TestAccAwsDxConnection_disappears
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_disappears
=== PAUSE TestAccAwsDxLag_disappears
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_disappears
=== CONT  TestAccAwsDxConnection_disappears
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (18.62s)
--- PASS: TestAccAwsDxConnection_disappears (32.80s)
--- PASS: TestAccAwsDxLag_disappears (33.16s)
--- PASS: TestAccAwsDxConnection_basic (33.75s)
--- PASS: TestAccAwsDxLag_basic (50.06s)
--- PASS: TestAccAwsDxConnection_Tags (60.16s)
--- PASS: TestAccAwsDxLag_Tags (61.68s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	61.785s

@ewbankkit ewbankkit requested a review from a team August 12, 2019 17:10
@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/directconnect Issues and PRs that pertain to the directconnect service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 12, 2019
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Aug 12, 2019
@ewbankkit ewbankkit changed the title [WIP] New data sources 'aws_dx_location' and 'aws_dx_locations' New data sources 'aws_dx_location' and 'aws_dx_locations' Aug 12, 2019
@ewbankkit
Copy link
Contributor Author

Changed aws_dx_connection and aws_dx_lag resource acceptance tests to use the new aws_dx_locations data source instead of hard-coding a Direct Connect location (and assuming an AWS region).

@ewbankkit
Copy link
Contributor Author

Removed WIP.
Ready for review.

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Aug 12, 2019

Now that the Connection and LAG tests are in better shape I can make the tag-on-create changes for #9172.

@aeschright aeschright added the new-data-source Introduces a new data source. label Aug 19, 2019
@ewbankkit
Copy link
Contributor Author

Rebased and re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccDataSourceAwsDxLocation_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (21.50s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	21.561s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxConnection_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxConnection_ -timeout 120m
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
=== CONT  TestAccAwsDxConnection_Tags
--- PASS: TestAccAwsDxConnection_basic (34.30s)
--- PASS: TestAccAwsDxConnection_Tags (49.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	49.694s
 make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
--- PASS: TestAccAwsDxLag_basic (49.87s)
--- PASS: TestAccAwsDxLag_Tags (52.60s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	52.686s

@ewbankkit
Copy link
Contributor Author

Rebased and did the Terraform Plugin SDK migration for the new resources.

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Oct 10, 2019

Added available_providers, available with AWS SDK v1.25.7, #10378.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccDataSourceAwsDxLocation_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (19.13s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	19.239s

@ewbankkit
Copy link
Contributor Author

The aws_dx_connection and aws_dx_lag resource import acceptance tests have also been refactored.

@ewbankkit
Copy link
Contributor Author

Track #10571 for import acceptance test refactoring.

@ewbankkit

This comment has been minimized.

@devonbleak
Copy link
Contributor

Confirming acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccDataSourceAwsDxLocation_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (17.51s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       18.630s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxConnection_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxConnection_ -timeout 120m
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
=== CONT  TestAccAwsDxConnection_Tags
--- PASS: TestAccAwsDxConnection_basic (28.44s)
--- PASS: TestAccAwsDxConnection_Tags (39.38s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       40.683s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
--- PASS: TestAccAwsDxLag_basic (41.10s)
--- PASS: TestAccAwsDxLag_Tags (42.43s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       43.503s

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Dec 17, 2019

Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 1 -run=TestAccDataSourceAwsDxLocation_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccDataSourceAwsDxLocation_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (29.96s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	30.027s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxConnection_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 1 -run=TestAccAwsDxConnection_ -timeout 120m
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
--- PASS: TestAccAwsDxConnection_basic (39.24s)
=== CONT  TestAccAwsDxConnection_Tags
--- PASS: TestAccAwsDxConnection_Tags (57.37s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	96.682s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 1 -run=TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_basic
--- PASS: TestAccAwsDxLag_basic (57.36s)
=== CONT  TestAccAwsDxLag_Tags
--- PASS: TestAccAwsDxLag_Tags (59.52s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	116.937s

Kit Ewbank and others added 12 commits August 24, 2021 14:34
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (16.70s)
--- PASS: TestAccAwsDxConnection_basic (35.62s)
--- PASS: TestAccAwsDxConnection_Tags (49.72s)
--- PASS: TestAccAwsDxLag_basic (49.83s)
--- PASS: TestAccAwsDxLag_Tags (51.23s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	51.343s
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (16.60s)
--- PASS: TestAccAwsDxConnection_basic (31.50s)
--- PASS: TestAccAwsDxLag_basic (46.54s)
--- PASS: TestAccAwsDxConnection_Tags (46.93s)
--- PASS: TestAccAwsDxLag_Tags (47.91s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	48.028s
…shicorp#13826).

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsDxLag_ -timeout 120m
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_disappears
=== PAUSE TestAccAwsDxLag_disappears
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_disappears
--- PASS: TestAccAwsDxLag_disappears (26.06s)
--- PASS: TestAccAwsDxLag_basic (40.96s)
--- PASS: TestAccAwsDxLag_Tags (53.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	53.107s
…est (hashicorp#13826).

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxConnection_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsDxConnection_ -timeout 120m
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_disappears
=== PAUSE TestAccAwsDxConnection_disappears
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_disappears
--- PASS: TestAccAwsDxConnection_disappears (24.89s)
--- PASS: TestAccAwsDxConnection_basic (29.22s)
--- PASS: TestAccAwsDxConnection_Tags (51.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	51.844s
Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_ -timeout 180m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_disappears
=== PAUSE TestAccAwsDxConnection_disappears
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_disappears
=== PAUSE TestAccAwsDxLag_disappears
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxLag_disappears
=== CONT  TestAccAwsDxConnection_disappears
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxConnection_basic
--- PASS: TestAccDataSourceAwsDxLocation_basic (19.49s)
--- PASS: TestAccAwsDxConnection_disappears (34.47s)
--- PASS: TestAccAwsDxConnection_basic (35.24s)
--- PASS: TestAccAwsDxLag_disappears (35.80s)
--- PASS: TestAccAwsDxLag_basic (54.60s)
--- PASS: TestAccAwsDxConnection_Tags (66.02s)
--- PASS: TestAccAwsDxLag_Tags (66.93s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	67.049s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsDxLocation_\|TestAccAwsDxConnection_\|TestAccAwsDxLag_ -timeout 180m
=== RUN   TestAccDataSourceAwsDxLocation_basic
=== PAUSE TestAccDataSourceAwsDxLocation_basic
=== RUN   TestAccAwsDxConnection_basic
=== PAUSE TestAccAwsDxConnection_basic
=== RUN   TestAccAwsDxConnection_disappears
=== PAUSE TestAccAwsDxConnection_disappears
=== RUN   TestAccAwsDxConnection_Tags
=== PAUSE TestAccAwsDxConnection_Tags
=== RUN   TestAccAwsDxLag_basic
=== PAUSE TestAccAwsDxLag_basic
=== RUN   TestAccAwsDxLag_disappears
=== PAUSE TestAccAwsDxLag_disappears
=== RUN   TestAccAwsDxLag_Tags
=== PAUSE TestAccAwsDxLag_Tags
=== CONT  TestAccDataSourceAwsDxLocation_basic
=== CONT  TestAccAwsDxLag_basic
=== CONT  TestAccAwsDxLag_disappears
=== CONT  TestAccAwsDxConnection_Tags
=== CONT  TestAccAwsDxLag_Tags
=== CONT  TestAccAwsDxConnection_basic
=== CONT  TestAccAwsDxConnection_disappears
--- PASS: TestAccDataSourceAwsDxLocation_basic (19.84s)
--- PASS: TestAccAwsDxConnection_disappears (32.71s)
--- PASS: TestAccAwsDxLag_disappears (32.74s)
--- PASS: TestAccAwsDxConnection_basic (40.63s)
--- PASS: TestAccAwsDxLag_basic (54.71s)
--- PASS: TestAccAwsDxConnection_Tags (68.14s)
--- PASS: TestAccAwsDxLag_Tags (68.96s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       72.257s
@github-actions github-actions bot added the service/location Issues and PRs that pertain to the location service. label Aug 24, 2021
@ewbankkit ewbankkit merged commit 1274562 into hashicorp:main Aug 25, 2021
@github-actions github-actions bot added this to the v3.56.0 milestone Aug 25, 2021
@ewbankkit ewbankkit removed the service/location Issues and PRs that pertain to the location service. label Aug 25, 2021
@ewbankkit ewbankkit deleted the issue-9708 branch August 25, 2021 18:22
@github-actions
Copy link

This functionality has been released in v3.56.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2022
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. new-data-source Introduces a new data source. provider Pertains to the provider itself, rather than any interaction with AWS. service/directconnect Issues and PRs that pertain to the directconnect 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.

New data sources: aws_dx_location and aws_dx_locations
4 participants