-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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 CodeStar Connection data source lookup by name #19262
Support CodeStar Connection data source lookup by name #19262
Conversation
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
…urce-by-name Fix merge conflicts caused by the hashicorp#21306 armageddon :)
Updated acceptance test run after the merge:
|
Acceptance test output: % make testacc TESTS=TestAccCodeStarConnectionsConnection_ PKG=codestarconnections ACCTEST_PARALLELISM=2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 2 -run='TestAccCodeStarConnectionsConnection_' -timeout 180m === RUN TestAccCodeStarConnectionsConnection_basic === PAUSE TestAccCodeStarConnectionsConnection_basic === RUN TestAccCodeStarConnectionsConnection_hostARN === PAUSE TestAccCodeStarConnectionsConnection_hostARN === RUN TestAccCodeStarConnectionsConnection_disappears === PAUSE TestAccCodeStarConnectionsConnection_disappears === RUN TestAccCodeStarConnectionsConnection_tags === PAUSE TestAccCodeStarConnectionsConnection_tags === CONT TestAccCodeStarConnectionsConnection_basic === CONT TestAccCodeStarConnectionsConnection_hostARN --- PASS: TestAccCodeStarConnectionsConnection_basic (24.10s) === CONT TestAccCodeStarConnectionsConnection_disappears --- PASS: TestAccCodeStarConnectionsConnection_hostARN (24.83s) === CONT TestAccCodeStarConnectionsConnection_tags --- PASS: TestAccCodeStarConnectionsConnection_disappears (13.57s) --- PASS: TestAccCodeStarConnectionsConnection_tags (45.08s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 76.514s
Acceptance test output: % make testacc TESTS=TestAccCodeStarConnectionsConnectionDataSource_ PKG=codestarconnections ACCTEST_PARALLELISM=2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 2 -run='TestAccCodeStarConnectionsConnectionDataSource_' -timeout 180m === RUN TestAccCodeStarConnectionsConnectionDataSource_basic === PAUSE TestAccCodeStarConnectionsConnectionDataSource_basic === RUN TestAccCodeStarConnectionsConnectionDataSource_tags === PAUSE TestAccCodeStarConnectionsConnectionDataSource_tags === CONT TestAccCodeStarConnectionsConnectionDataSource_basic === CONT TestAccCodeStarConnectionsConnectionDataSource_tags --- PASS: TestAccCodeStarConnectionsConnectionDataSource_tags (19.78s) --- PASS: TestAccCodeStarConnectionsConnectionDataSource_basic (20.26s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 27.885s
Acceptance test output: % make testacc TESTS=TestAccCodeStarConnectionsHost_basic PKG=codestarconnections ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 20 -run='TestAccCodeStarConnectionsHost_basic' -timeout 180m === RUN TestAccCodeStarConnectionsHost_basic === PAUSE TestAccCodeStarConnectionsHost_basic === CONT TestAccCodeStarConnectionsHost_basic --- PASS: TestAccCodeStarConnectionsHost_basic (26.92s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 35.254s
Acceptance test output: % make sweep SWEEPARGS=-sweep-run=aws_codestarconnections_host WARNING: This will destroy infrastructure. Use only in development accounts. go test ./internal/sweep -v -tags=sweep -sweep=us-west-2,us-east-1,us-east-2 -sweep-run=aws_codestarconnections_host -timeout 60m 2022/05/06 14:24:53 [DEBUG] Running Sweepers for region (us-west-2): 2022/05/06 14:24:53 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running.. 2022/05/06 14:24:53 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-west-2) 2022/05/06 14:24:53 [INFO] Retrieved credentials from "EnvConfigCredentials" 2022/05/06 14:24:53 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:54 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:56 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-west-2) in 3.204716576s 2022/05/06 14:24:56 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-west-2) 2022/05/06 14:24:56 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-west-2) in 182.956826ms 2022/05/06 14:24:56 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-west-2) 2022/05/06 14:24:56 Completed Sweepers for region (us-west-2) in 3.387883982s 2022/05/06 14:24:56 Sweeper Tests for region (us-west-2) ran successfully: - aws_codestarconnections_connection - aws_codestarconnections_host 2022/05/06 14:24:56 [DEBUG] Running Sweepers for region (us-east-1): 2022/05/06 14:24:56 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running.. 2022/05/06 14:24:56 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-east-1) 2022/05/06 14:24:56 [INFO] Retrieved credentials from "EnvConfigCredentials" 2022/05/06 14:24:56 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:57 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-east-1) in 2.588793075s 2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-east-1) 2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-east-1) in 46.946309ms 2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-east-1) 2022/05/06 14:24:59 Completed Sweepers for region (us-east-1) in 2.635781717s 2022/05/06 14:24:59 Sweeper Tests for region (us-east-1) ran successfully: - aws_codestarconnections_connection - aws_codestarconnections_host 2022/05/06 14:24:59 [DEBUG] Running Sweepers for region (us-east-2): 2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-east-2) 2022/05/06 14:24:59 [INFO] Retrieved credentials from "EnvConfigCredentials" 2022/05/06 14:24:59 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:59 [DEBUG] Trying to get account information via sts:GetCallerIdentity 2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-east-2) in 655.334506ms 2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running.. 2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-east-2) 2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-east-2) 2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-east-2) in 64.874316ms 2022/05/06 14:24:59 Completed Sweepers for region (us-east-2) in 720.25378ms 2022/05/06 14:24:59 Sweeper Tests for region (us-east-2) ran successfully: - aws_codestarconnections_connection - aws_codestarconnections_host ok github.com/hashicorp/terraform-provider-aws/internal/sweep 10.453s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make sweep SWEEPARGS=-sweep-run=aws_codestarconnections_host
# make sweep SWEEPARGS=-sweep-run=aws_example_thing
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./internal/sweep -v -tags=sweep -sweep=us-west-2,us-east-1,us-east-2 -sweep-run=aws_codestarconnections_host -timeout 60m
2022/05/06 14:24:53 [DEBUG] Running Sweepers for region (us-west-2):
2022/05/06 14:24:53 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running..
2022/05/06 14:24:53 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-west-2)
2022/05/06 14:24:53 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/05/06 14:24:53 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:54 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:56 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-west-2) in 3.204716576s
2022/05/06 14:24:56 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-west-2)
2022/05/06 14:24:56 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-west-2) in 182.956826ms
2022/05/06 14:24:56 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-west-2)
2022/05/06 14:24:56 Completed Sweepers for region (us-west-2) in 3.387883982s
2022/05/06 14:24:56 Sweeper Tests for region (us-west-2) ran successfully:
- aws_codestarconnections_connection
- aws_codestarconnections_host
2022/05/06 14:24:56 [DEBUG] Running Sweepers for region (us-east-1):
2022/05/06 14:24:56 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running..
2022/05/06 14:24:56 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-east-1)
2022/05/06 14:24:56 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/05/06 14:24:56 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:57 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-east-1) in 2.588793075s
2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-east-1)
2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-east-1) in 46.946309ms
2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-east-1)
2022/05/06 14:24:59 Completed Sweepers for region (us-east-1) in 2.635781717s
2022/05/06 14:24:59 Sweeper Tests for region (us-east-1) ran successfully:
- aws_codestarconnections_connection
- aws_codestarconnections_host
2022/05/06 14:24:59 [DEBUG] Running Sweepers for region (us-east-2):
2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_connection) in region (us-east-2)
2022/05/06 14:24:59 [INFO] Retrieved credentials from "EnvConfigCredentials"
2022/05/06 14:24:59 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:59 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_connection) in region (us-east-2) in 655.334506ms
2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_host) has dependency (aws_codestarconnections_connection), running..
2022/05/06 14:24:59 [DEBUG] Sweeper (aws_codestarconnections_connection) already ran in region (us-east-2)
2022/05/06 14:24:59 [DEBUG] Running Sweeper (aws_codestarconnections_host) in region (us-east-2)
2022/05/06 14:24:59 [DEBUG] Completed Sweeper (aws_codestarconnections_host) in region (us-east-2) in 64.874316ms
2022/05/06 14:24:59 Completed Sweepers for region (us-east-2) in 720.25378ms
2022/05/06 14:24:59 Sweeper Tests for region (us-east-2) ran successfully:
- aws_codestarconnections_connection
- aws_codestarconnections_host
ok github.com/hashicorp/terraform-provider-aws/internal/sweep 10.453s
% make testacc TESTS=TestAccCodeStarConnectionsConnectionDataSource_ PKG=codestarconnections ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 2 -run='TestAccCodeStarConnectionsConnectionDataSource_' -timeout 180m
=== RUN TestAccCodeStarConnectionsConnectionDataSource_basic
=== PAUSE TestAccCodeStarConnectionsConnectionDataSource_basic
=== RUN TestAccCodeStarConnectionsConnectionDataSource_tags
=== PAUSE TestAccCodeStarConnectionsConnectionDataSource_tags
=== CONT TestAccCodeStarConnectionsConnectionDataSource_basic
=== CONT TestAccCodeStarConnectionsConnectionDataSource_tags
--- PASS: TestAccCodeStarConnectionsConnectionDataSource_basic (20.49s)
--- PASS: TestAccCodeStarConnectionsConnectionDataSource_tags (20.54s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 28.602s
% make testacc TESTS=TestAccCodeStarConnectionsConnection_ PKG=codestarconnections ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 2 -run='TestAccCodeStarConnectionsConnection_' -timeout 180m
=== RUN TestAccCodeStarConnectionsConnection_basic
=== PAUSE TestAccCodeStarConnectionsConnection_basic
=== RUN TestAccCodeStarConnectionsConnection_hostARN
=== PAUSE TestAccCodeStarConnectionsConnection_hostARN
=== RUN TestAccCodeStarConnectionsConnection_disappears
=== PAUSE TestAccCodeStarConnectionsConnection_disappears
=== RUN TestAccCodeStarConnectionsConnection_tags
=== PAUSE TestAccCodeStarConnectionsConnection_tags
=== CONT TestAccCodeStarConnectionsConnection_basic
=== CONT TestAccCodeStarConnectionsConnection_disappears
--- PASS: TestAccCodeStarConnectionsConnection_disappears (15.25s)
=== CONT TestAccCodeStarConnectionsConnection_hostARN
--- PASS: TestAccCodeStarConnectionsConnection_basic (20.50s)
=== CONT TestAccCodeStarConnectionsConnection_tags
--- PASS: TestAccCodeStarConnectionsConnection_hostARN (19.74s)
--- PASS: TestAccCodeStarConnectionsConnection_tags (47.90s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 76.514s
% make testacc TESTS=TestAccCodeStarConnectionsHost_ PKG=codestarconnections ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codestarconnections/... -v -count 1 -parallel 2 -run='TestAccCodeStarConnectionsHost_' -timeout 180m
=== RUN TestAccCodeStarConnectionsHost_basic
=== PAUSE TestAccCodeStarConnectionsHost_basic
=== RUN TestAccCodeStarConnectionsHost_disappears
=== PAUSE TestAccCodeStarConnectionsHost_disappears
=== RUN TestAccCodeStarConnectionsHost_vpc
=== PAUSE TestAccCodeStarConnectionsHost_vpc
=== CONT TestAccCodeStarConnectionsHost_basic
=== CONT TestAccCodeStarConnectionsHost_vpc
--- PASS: TestAccCodeStarConnectionsHost_basic (21.62s)
=== CONT TestAccCodeStarConnectionsHost_disappears
--- PASS: TestAccCodeStarConnectionsHost_disappears (15.86s)
--- PASS: TestAccCodeStarConnectionsHost_vpc (494.45s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codestarconnections 500.765s
@wedge-jarrad Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.14.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! |
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. |
Update aws_codestarconnections_connection data source to allow lookups by name.
Community Note
Relates #15453
Output from acceptance testing: