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

[AWS SDK for Go Migration] Meta Data Sources (Region) Service #39389

Merged
merged 31 commits into from
Sep 20, 2024

Conversation

hskiba
Copy link
Contributor

@hskiba hskiba commented Sep 19, 2024

This resolves problems using region lookup for the newly-launched Malaysia region ap-southeast-5 (see #36224).

This migrates the region data source to AWS SDK v2. In v2, the endpoints package is no longer available. Now, regions need to be queried in the account using the configured client. I chose to use the ec2 client given the current data source supports lookup using the EC2 endpoint. The change in behavior is that if a region is valid but is not available to the account, e.g., cn-north-1 when in the standard partition, the region lookup by name will fail. A number of tests that were successful before because they were static lookups embedded in the SDK are no longer successful when running outside of their partition. I adjusted these tests (TestAccMetaServicePrincipal) to be skipped if not being run from the test case region's partition.

Relations

Relates #36188.
Closes #39224.
Relates #38989.

References

Output from Acceptance Testing

% make testacc TESTS='TestAccMetaRegionDataSource|TestAccMetaServicePrincipal' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20 -run='TestAccMetaRegionDataSource|TestAccMetaServicePrincipal'  -timeout 360m
=== RUN   TestAccMetaRegionDataSource_FindRegionByEC2Endpoint
=== PAUSE TestAccMetaRegionDataSource_FindRegionByEC2Endpoint
=== RUN   TestAccMetaRegionDataSource_FindRegionByName
=== PAUSE TestAccMetaRegionDataSource_FindRegionByName
=== RUN   TestAccMetaRegionDataSource_basic
=== PAUSE TestAccMetaRegionDataSource_basic
=== RUN   TestAccMetaRegionDataSource_endpoint
=== PAUSE TestAccMetaRegionDataSource_endpoint
=== RUN   TestAccMetaRegionDataSource_endpointAndName
=== PAUSE TestAccMetaRegionDataSource_endpointAndName
=== RUN   TestAccMetaRegionDataSource_name
=== PAUSE TestAccMetaRegionDataSource_name
=== RUN   TestAccMetaServicePrincipal_basic
=== PAUSE TestAccMetaServicePrincipal_basic
=== RUN   TestAccMetaServicePrincipal_MissingService
=== PAUSE TestAccMetaServicePrincipal_MissingService
=== RUN   TestAccMetaServicePrincipal_ByRegion
=== RUN   TestAccMetaServicePrincipal_ByRegion/us-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-east-1
=== RUN   TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== RUN   TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== RUN   TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== RUN   TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
=== RUN   TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== PAUSE TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/us-east-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/cn-north-1
=== CONT  TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
=== NAME  TestAccMetaServicePrincipal_ByRegion/us-gov-east-1
    service_principal_data_source_test.go:66: skipping tests; current partition (aws) does not equal aws-us-gov
=== NAME  TestAccMetaServicePrincipal_ByRegion/us-iso-east-1
    service_principal_data_source_test.go:66: skipping tests; current partition (aws) does not equal aws-iso
=== NAME  TestAccMetaServicePrincipal_ByRegion/cn-north-1
    service_principal_data_source_test.go:66: skipping tests; current partition (aws) does not equal aws-cn
=== NAME  TestAccMetaServicePrincipal_ByRegion/us-isob-east-1
    service_principal_data_source_test.go:66: skipping tests; current partition (aws) does not equal aws-iso-b
=== NAME  TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1
    service_principal_data_source_test.go:66: skipping tests; current partition (aws) does not equal aws-iso-e
--- PASS: TestAccMetaServicePrincipal_ByRegion (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_ByRegion/us-gov-east-1 (0.83s)
    --- SKIP: TestAccMetaServicePrincipal_ByRegion/us-iso-east-1 (0.83s)
    --- SKIP: TestAccMetaServicePrincipal_ByRegion/cn-north-1 (0.83s)
    --- SKIP: TestAccMetaServicePrincipal_ByRegion/us-isob-east-1 (0.83s)
    --- SKIP: TestAccMetaServicePrincipal_ByRegion/eu-isoe-west-1 (0.83s)
    --- PASS: TestAccMetaServicePrincipal_ByRegion/us-east-1 (13.40s)
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== RUN   TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== PAUSE TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso-b
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-cn
=== CONT  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-cn
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-cn
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso
=== NAME  TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms
    service_principal_data_source_test.go:140: skipping tests; current partition (aws) does not equal aws-iso-b
--- PASS: TestAccMetaServicePrincipal_UniqueForServiceInRegion (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/cloudhsm (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/logs (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/workspaces (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/codedeploy (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/config (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/elasticmapreduce (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/cn-north-1/logs (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-iso-east-1/logs (0.00s)
    --- SKIP: TestAccMetaServicePrincipal_UniqueForServiceInRegion/us-isob-east-1/dms (0.00s)
=== CONT  TestAccMetaRegionDataSource_FindRegionByEC2Endpoint
=== CONT  TestAccMetaServicePrincipal_MissingService
=== CONT  TestAccMetaServicePrincipal_basic
=== CONT  TestAccMetaRegionDataSource_basic
=== CONT  TestAccMetaRegionDataSource_name
=== CONT  TestAccMetaRegionDataSource_endpoint
=== CONT  TestAccMetaRegionDataSource_FindRegionByName
=== CONT  TestAccMetaRegionDataSource_endpointAndName
--- PASS: TestAccMetaServicePrincipal_MissingService (1.37s)
--- PASS: TestAccMetaRegionDataSource_FindRegionByName (1.96s)
--- PASS: TestAccMetaRegionDataSource_FindRegionByEC2Endpoint (2.12s)
--- PASS: TestAccMetaServicePrincipal_basic (14.66s)
--- PASS: TestAccMetaRegionDataSource_basic (14.67s)
--- PASS: TestAccMetaRegionDataSource_endpointAndName (15.96s)
--- PASS: TestAccMetaRegionDataSource_endpoint (16.06s)
--- PASS: TestAccMetaRegionDataSource_name (17.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	35.735s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/meta Issues and PRs that pertain to the meta service. needs-triage Waiting for first response or review from a maintainer. labels Sep 19, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @hskiba 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@hskiba hskiba marked this pull request as ready for review September 19, 2024 10:28
@hskiba hskiba requested a review from a team as a code owner September 19, 2024 10:28
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Sep 19, 2024
@ewbankkit ewbankkit self-assigned this Sep 19, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 19, 2024
@hskiba hskiba force-pushed the td-migrate_region_data_source_sdkv2 branch from 64c13a6 to 07827d3 Compare September 20, 2024 05:30
% make testacc TESTARGS='-run=TestAccMetaRegionDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaRegionDataSource_ -timeout 360m
=== RUN   TestAccMetaRegionDataSource_basic
=== PAUSE TestAccMetaRegionDataSource_basic
=== RUN   TestAccMetaRegionDataSource_endpoint
=== PAUSE TestAccMetaRegionDataSource_endpoint
=== RUN   TestAccMetaRegionDataSource_endpointAndName
=== PAUSE TestAccMetaRegionDataSource_endpointAndName
=== RUN   TestAccMetaRegionDataSource_name
=== PAUSE TestAccMetaRegionDataSource_name
=== CONT  TestAccMetaRegionDataSource_basic
=== CONT  TestAccMetaRegionDataSource_endpointAndName
=== CONT  TestAccMetaRegionDataSource_name
=== CONT  TestAccMetaRegionDataSource_endpoint
--- PASS: TestAccMetaRegionDataSource_basic (8.25s)
--- PASS: TestAccMetaRegionDataSource_endpointAndName (9.59s)
--- PASS: TestAccMetaRegionDataSource_name (9.59s)
--- PASS: TestAccMetaRegionDataSource_endpoint (9.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	14.858s
…gratable equivalent of 'Partition.Services()'.
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccMetaARNDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaARNDataSource_ -timeout 360m
=== RUN   TestAccMetaARNDataSource_basic
=== PAUSE TestAccMetaARNDataSource_basic
=== RUN   TestAccMetaARNDataSource_s3Bucket
=== PAUSE TestAccMetaARNDataSource_s3Bucket
=== CONT  TestAccMetaARNDataSource_basic
=== CONT  TestAccMetaARNDataSource_s3Bucket
--- PASS: TestAccMetaARNDataSource_s3Bucket (7.70s)
--- PASS: TestAccMetaARNDataSource_basic (7.70s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	12.796s
% make testacc TESTARGS='-run=TestAccMetaBillingServiceAccountDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaBillingServiceAccountDataSource_ -timeout 360m
=== RUN   TestAccMetaBillingServiceAccountDataSource_basic
=== PAUSE TestAccMetaBillingServiceAccountDataSource_basic
=== CONT  TestAccMetaBillingServiceAccountDataSource_basic
--- PASS: TestAccMetaBillingServiceAccountDataSource_basic (7.46s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	12.445s
% make testacc TESTARGS='-run=TestAccMetaDefaultTagsDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaDefaultTagsDataSource_ -timeout 360m
=== RUN   TestAccMetaDefaultTagsDataSource_basic
=== PAUSE TestAccMetaDefaultTagsDataSource_basic
=== RUN   TestAccMetaDefaultTagsDataSource_empty
=== PAUSE TestAccMetaDefaultTagsDataSource_empty
=== RUN   TestAccMetaDefaultTagsDataSource_multiple
=== PAUSE TestAccMetaDefaultTagsDataSource_multiple
=== RUN   TestAccMetaDefaultTagsDataSource_ignore
=== PAUSE TestAccMetaDefaultTagsDataSource_ignore
=== CONT  TestAccMetaDefaultTagsDataSource_basic
=== CONT  TestAccMetaDefaultTagsDataSource_multiple
=== CONT  TestAccMetaDefaultTagsDataSource_empty
=== CONT  TestAccMetaDefaultTagsDataSource_ignore
--- PASS: TestAccMetaDefaultTagsDataSource_basic (7.01s)
--- PASS: TestAccMetaDefaultTagsDataSource_multiple (7.01s)
--- PASS: TestAccMetaDefaultTagsDataSource_empty (8.17s)
--- PASS: TestAccMetaDefaultTagsDataSource_ignore (12.58s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	17.661s
% make testacc TESTARGS='-run=TestAccMetaIPRangesDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaIPRangesDataSource_ -timeout 360m
=== RUN   TestAccMetaIPRangesDataSource_basic
=== PAUSE TestAccMetaIPRangesDataSource_basic
=== RUN   TestAccMetaIPRangesDataSource_none
=== PAUSE TestAccMetaIPRangesDataSource_none
=== RUN   TestAccMetaIPRangesDataSource_url
=== PAUSE TestAccMetaIPRangesDataSource_url
=== RUN   TestAccMetaIPRangesDataSource_uppercase
=== PAUSE TestAccMetaIPRangesDataSource_uppercase
=== CONT  TestAccMetaIPRangesDataSource_basic
=== CONT  TestAccMetaIPRangesDataSource_url
=== CONT  TestAccMetaIPRangesDataSource_none
=== CONT  TestAccMetaIPRangesDataSource_uppercase
--- PASS: TestAccMetaIPRangesDataSource_basic (9.75s)
--- PASS: TestAccMetaIPRangesDataSource_url (9.87s)
--- PASS: TestAccMetaIPRangesDataSource_uppercase (10.10s)
--- PASS: TestAccMetaIPRangesDataSource_none (10.35s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	15.309s
% make testacc TESTARGS='-run=TestAccMetaPartitionDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaPartitionDataSource_ -timeout 360m
=== RUN   TestAccMetaPartitionDataSource_basic
=== PAUSE TestAccMetaPartitionDataSource_basic
=== CONT  TestAccMetaPartitionDataSource_basic
--- PASS: TestAccMetaPartitionDataSource_basic (7.50s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	12.464s
% make testacc TESTARGS='-run=TestAccMetaRegionDataSource_' PKG=meta 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaRegionDataSource_ -timeout 360m
=== RUN   TestAccMetaRegionDataSource_basic
=== PAUSE TestAccMetaRegionDataSource_basic
=== RUN   TestAccMetaRegionDataSource_endpoint
=== PAUSE TestAccMetaRegionDataSource_endpoint
=== RUN   TestAccMetaRegionDataSource_endpointAndName
=== PAUSE TestAccMetaRegionDataSource_endpointAndName
=== RUN   TestAccMetaRegionDataSource_name
=== PAUSE TestAccMetaRegionDataSource_name
=== CONT  TestAccMetaRegionDataSource_basic
=== CONT  TestAccMetaRegionDataSource_endpointAndName
=== CONT  TestAccMetaRegionDataSource_name
=== CONT  TestAccMetaRegionDataSource_endpoint
--- PASS: TestAccMetaRegionDataSource_basic (8.09s)
--- PASS: TestAccMetaRegionDataSource_endpointAndName (9.54s)
--- PASS: TestAccMetaRegionDataSource_name (9.64s)
--- PASS: TestAccMetaRegionDataSource_endpoint (9.64s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	14.413s
% make testacc TESTARGS='-run=TestAccMetaRegionsDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaRegionsDataSource_ -timeout 360m
=== RUN   TestAccMetaRegionsDataSource_basic
=== PAUSE TestAccMetaRegionsDataSource_basic
=== RUN   TestAccMetaRegionsDataSource_filter
=== PAUSE TestAccMetaRegionsDataSource_filter
=== RUN   TestAccMetaRegionsDataSource_allRegions
=== PAUSE TestAccMetaRegionsDataSource_allRegions
=== RUN   TestAccMetaRegionsDataSource_nonExistentRegion
=== PAUSE TestAccMetaRegionsDataSource_nonExistentRegion
=== CONT  TestAccMetaRegionsDataSource_basic
=== CONT  TestAccMetaRegionsDataSource_allRegions
=== CONT  TestAccMetaRegionsDataSource_filter
=== CONT  TestAccMetaRegionsDataSource_nonExistentRegion
--- PASS: TestAccMetaRegionsDataSource_allRegions (9.49s)
--- PASS: TestAccMetaRegionsDataSource_filter (9.49s)
--- PASS: TestAccMetaRegionsDataSource_basic (9.52s)
--- PASS: TestAccMetaRegionsDataSource_nonExistentRegion (9.56s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	14.645s
% make testacc TESTARGS='-run=TestAccMetaServiceDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaServiceDataSource_ -timeout 360m
=== RUN   TestAccMetaServiceDataSource_basic
=== PAUSE TestAccMetaServiceDataSource_basic
=== RUN   TestAccMetaServiceDataSource_irregularServiceID
=== PAUSE TestAccMetaServiceDataSource_irregularServiceID
=== RUN   TestAccMetaServiceDataSource_irregularServiceIDUnsupported
=== PAUSE TestAccMetaServiceDataSource_irregularServiceIDUnsupported
=== RUN   TestAccMetaServiceDataSource_byReverseDNSName
=== PAUSE TestAccMetaServiceDataSource_byReverseDNSName
=== RUN   TestAccMetaServiceDataSource_byDNSName
=== PAUSE TestAccMetaServiceDataSource_byDNSName
=== RUN   TestAccMetaServiceDataSource_byParts
=== PAUSE TestAccMetaServiceDataSource_byParts
=== RUN   TestAccMetaServiceDataSource_unsupported
=== PAUSE TestAccMetaServiceDataSource_unsupported
=== CONT  TestAccMetaServiceDataSource_basic
=== CONT  TestAccMetaServiceDataSource_byDNSName
=== CONT  TestAccMetaServiceDataSource_unsupported
=== CONT  TestAccMetaServiceDataSource_byParts
=== CONT  TestAccMetaServiceDataSource_irregularServiceIDUnsupported
=== CONT  TestAccMetaServiceDataSource_byReverseDNSName
=== CONT  TestAccMetaServiceDataSource_irregularServiceID
--- PASS: TestAccMetaServiceDataSource_byDNSName (9.33s)
--- PASS: TestAccMetaServiceDataSource_irregularServiceIDUnsupported (9.34s)
--- PASS: TestAccMetaServiceDataSource_unsupported (9.44s)
--- PASS: TestAccMetaServiceDataSource_byParts (9.45s)
--- PASS: TestAccMetaServiceDataSource_irregularServiceID (9.52s)
--- PASS: TestAccMetaServiceDataSource_byReverseDNSName (9.52s)
--- PASS: TestAccMetaServiceDataSource_basic (9.53s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	14.907s
% make testacc TESTARGS='-run=TestAccMetaServicePrincipalDataSource_' PKG=meta
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/meta/... -v -count 1 -parallel 20  -run=TestAccMetaServicePrincipalDataSource_ -timeout 360m
=== RUN   TestAccMetaServicePrincipalDataSource_basic
=== PAUSE TestAccMetaServicePrincipalDataSource_basic
=== RUN   TestAccMetaServicePrincipalDataSource_MissingService
=== PAUSE TestAccMetaServicePrincipalDataSource_MissingService
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/us-east-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/us-east-1
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/cn-north-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/cn-north-1
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/us-gov-east-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/us-gov-east-1
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/us-iso-east-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/us-iso-east-1
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/us-isob-east-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/us-isob-east-1
=== RUN   TestAccMetaServicePrincipalDataSource_ByRegion/eu-isoe-west-1
=== PAUSE TestAccMetaServicePrincipalDataSource_ByRegion/eu-isoe-west-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/us-east-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/eu-isoe-west-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/us-iso-east-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/us-gov-east-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/us-isob-east-1
=== CONT  TestAccMetaServicePrincipalDataSource_ByRegion/cn-north-1
--- PASS: TestAccMetaServicePrincipalDataSource_ByRegion (0.00s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/us-east-1 (9.35s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/us-isob-east-1 (9.42s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/us-gov-east-1 (9.88s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/us-iso-east-1 (9.98s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/cn-north-1 (10.07s)
    --- PASS: TestAccMetaServicePrincipalDataSource_ByRegion/eu-isoe-west-1 (10.08s)
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/config
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/config
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/logs
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/logs
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/dms
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/dms
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/logs
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/logs
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/codedeploy
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/codedeploy
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== RUN   TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/logs
=== PAUSE TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/logs
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/cloudhsm
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/logs
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/elasticmapreduce
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/logs
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/dms
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/codedeploy
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/logs
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/workspaces
=== CONT  TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/config
--- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion (0.00s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/dms (11.30s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/logs (11.56s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/codedeploy (11.60s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/logs (11.63s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/workspaces (11.93s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/config (12.09s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-isob-east-1/logs (12.09s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/cn-north-1/elasticmapreduce (12.17s)
    --- PASS: TestAccMetaServicePrincipalDataSource_UniqueForServiceInRegion/us-iso-east-1/cloudhsm (12.19s)
=== CONT  TestAccMetaServicePrincipalDataSource_basic
=== CONT  TestAccMetaServicePrincipalDataSource_MissingService
--- PASS: TestAccMetaServicePrincipalDataSource_MissingService (0.91s)
--- PASS: TestAccMetaServicePrincipalDataSource_basic (7.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/meta	34.925s

@ewbankkit
Copy link
Contributor

ewbankkit commented Sep 20, 2024

@hskiba Thanks for the contribution 🎉 👏.
We added updated partition and Region metadata to the aws-sdk-go-base module via hashicorp/aws-sdk-go-base#1176 and as your change would have been a breaking change (couldn't lookup Regions not in the configured partition) I went back to use the (new) endpoints module.

To complete the migration of the aws_service data source away from AWS SDK for Go v1 we are going to have to add service metadata (at least the services for a partition) to our new endpoints package as there is no equivalent functionality in AWS SDK for Go v2.

@ewbankkit ewbankkit merged commit 77cd6ed into hashicorp:main Sep 20, 2024
33 checks passed
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Sep 20, 2024
@github-actions github-actions bot added this to the v5.69.0 milestone Sep 20, 2024
@hskiba
Copy link
Contributor Author

hskiba commented Sep 20, 2024

@hskiba Thanks for the contribution 🎉 👏. We added updated partition and Region metadata to the aws-sdk-go-base module via hashicorp/aws-sdk-go-base#1176

Sorry I missed that.

and as your change would have been a breaking change (couldn't lookup Regions not in the configured partition) I went back to use the (new) endpoints module.

Thank you! 🙏

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 26, 2024
Copy link

This functionality has been released in v5.69.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!

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 Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/meta Issues and PRs that pertain to the meta service. 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.

[Bug]: ap-southeast-5
2 participants