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

Migrate Outposts resources to AWS SDK v2 #38909

Merged
merged 12 commits into from
Aug 19, 2024

Conversation

DanielRieske
Copy link
Contributor

@DanielRieske DanielRieske commented Aug 17, 2024

Description

This PR migrates the remaining Outposts data resources to AWS SDKv2.

I cannot test these resources as I don't have Outpost instances within my account, will follow the same test strategy as in:

#38075 (comment)

Relations

Closes #36195
Relates #32976

References

Output from Acceptance Testing

make testacc TESTARGS='-run=TestAcc' PKG=outposts
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/outposts/... -v -count 1 -parallel 20  -run=TestAcc -timeout 360m
=== RUN   TestAccOutpostsAssetDataSource_basic
=== PAUSE TestAccOutpostsAssetDataSource_basic
=== RUN   TestAccOutpostsAssetsDataSource_id
    outpost_assets_data_source_test.go:21: Environment variable OUTPOST_AVAIL is not set
--- SKIP: TestAccOutpostsAssetsDataSource_id (0.00s)
=== RUN   TestAccOutpostsAssetsDataSource_statusFilter
    outpost_assets_data_source_test.go:45: Environment variable OUTPOST_AVAIL is not set
--- SKIP: TestAccOutpostsAssetsDataSource_statusFilter (0.00s)
=== RUN   TestAccOutpostsAssetsDataSource_hostFilter
    outpost_assets_data_source_test.go:69: Environment variable OUTPOST_HOST_ID is not set
--- SKIP: TestAccOutpostsAssetsDataSource_hostFilter (0.00s)
=== RUN   TestAccOutpostsOutpostDataSource_id
=== PAUSE TestAccOutpostsOutpostDataSource_id
=== RUN   TestAccOutpostsOutpostDataSource_name
=== PAUSE TestAccOutpostsOutpostDataSource_name
=== RUN   TestAccOutpostsOutpostDataSource_arn
=== PAUSE TestAccOutpostsOutpostDataSource_arn
=== RUN   TestAccOutpostsOutpostDataSource_ownerID
=== PAUSE TestAccOutpostsOutpostDataSource_ownerID
=== RUN   TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== PAUSE TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== RUN   TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== PAUSE TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== RUN   TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== PAUSE TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== RUN   TestAccOutpostsDataSource_basic
=== PAUSE TestAccOutpostsDataSource_basic
=== RUN   TestAccOutpostsSiteDataSource_id
=== PAUSE TestAccOutpostsSiteDataSource_id
=== RUN   TestAccOutpostsSiteDataSource_name
=== PAUSE TestAccOutpostsSiteDataSource_name
=== RUN   TestAccOutpostsSitesDataSource_basic
=== PAUSE TestAccOutpostsSitesDataSource_basic
=== CONT  TestAccOutpostsAssetDataSource_basic
=== CONT  TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== CONT  TestAccOutpostsSiteDataSource_id
=== CONT  TestAccOutpostsDataSource_basic
=== CONT  TestAccOutpostsSitesDataSource_basic
=== CONT  TestAccOutpostsOutpostDataSource_arn
=== CONT  TestAccOutpostsSiteDataSource_name
=== CONT  TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== CONT  TestAccOutpostsOutpostDataSource_ownerID
=== CONT  TestAccOutpostsOutpostDataSource_id
=== CONT  TestAccOutpostsOutpostDataSource_name
=== CONT  TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== NAME  TestAccOutpostsOutpostDataSource_arn
    outpost_data_source_test.go:79: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_arn (1.24s)
=== NAME  TestAccOutpostsOutpostDataSource_ownerID
    outpost_data_source_test.go:106: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_ownerID (1.24s)
=== NAME  TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
    outpost_instance_type_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypeDataSource_instanceType (1.29s)
=== NAME  TestAccOutpostsOutpostInstanceTypesDataSource_basic
    outpost_instance_types_data_source_test.go:21: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypesDataSource_basic (1.31s)
=== NAME  TestAccOutpostsSiteDataSource_name
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSiteDataSource_name (1.31s)
=== NAME  TestAccOutpostsSiteDataSource_id
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSiteDataSource_id (1.31s)
=== NAME  TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
    outpost_instance_type_data_source_test.go:40: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes (1.32s)
=== NAME  TestAccOutpostsOutpostDataSource_name
    outpost_data_source_test.go:52: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_name (1.32s)
=== NAME  TestAccOutpostsOutpostDataSource_id
    outpost_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_id (1.38s)
=== NAME  TestAccOutpostsSitesDataSource_basic
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSitesDataSource_basic (1.38s)
=== NAME  TestAccOutpostsAssetDataSource_basic
    outpost_asset_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsAssetDataSource_basic (1.39s)
=== NAME  TestAccOutpostsDataSource_basic
    outposts_data_source_test.go:21: skipping since no Outposts found
--- SKIP: TestAccOutpostsDataSource_basic (6.60s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/outposts	11.174s

@DanielRieske DanielRieske requested a review from a team as a code owner August 17, 2024 11:55
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.

Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/outposts Issues and PRs that pertain to the outposts service. tags Pertains to resource tagging. client-connections Pertains to the AWS Client and service connections. generators Relates to code generators. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Aug 17, 2024
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 18, 2024
@ewbankkit ewbankkit self-assigned this Aug 18, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 18, 2024
@ewbankkit ewbankkit added the aws-sdk-go-migration Issues that are related to the providers migration to AWS SDK for Go v2. label Aug 18, 2024
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=TestAccOutposts' PKG=outposts
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/outposts/... -v -count 1 -parallel 20  -run=TestAccOutposts -timeout 360m
=== RUN   TestAccOutpostsAssetDataSource_basic
=== PAUSE TestAccOutpostsAssetDataSource_basic
=== RUN   TestAccOutpostsAssetsDataSource_id
    outpost_assets_data_source_test.go:21: Environment variable OUTPOST_AVAIL is not set
--- SKIP: TestAccOutpostsAssetsDataSource_id (0.00s)
=== RUN   TestAccOutpostsAssetsDataSource_statusFilter
    outpost_assets_data_source_test.go:45: Environment variable OUTPOST_AVAIL is not set
--- SKIP: TestAccOutpostsAssetsDataSource_statusFilter (0.00s)
=== RUN   TestAccOutpostsAssetsDataSource_hostFilter
    outpost_assets_data_source_test.go:69: Environment variable OUTPOST_HOST_ID is not set
--- SKIP: TestAccOutpostsAssetsDataSource_hostFilter (0.00s)
=== RUN   TestAccOutpostsOutpostDataSource_id
=== PAUSE TestAccOutpostsOutpostDataSource_id
=== RUN   TestAccOutpostsOutpostDataSource_name
=== PAUSE TestAccOutpostsOutpostDataSource_name
=== RUN   TestAccOutpostsOutpostDataSource_arn
=== PAUSE TestAccOutpostsOutpostDataSource_arn
=== RUN   TestAccOutpostsOutpostDataSource_ownerID
=== PAUSE TestAccOutpostsOutpostDataSource_ownerID
=== RUN   TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== PAUSE TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== RUN   TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== PAUSE TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== RUN   TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== PAUSE TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== RUN   TestAccOutpostsDataSource_basic
=== PAUSE TestAccOutpostsDataSource_basic
=== RUN   TestAccOutpostsSiteDataSource_id
=== PAUSE TestAccOutpostsSiteDataSource_id
=== RUN   TestAccOutpostsSiteDataSource_name
=== PAUSE TestAccOutpostsSiteDataSource_name
=== RUN   TestAccOutpostsSitesDataSource_basic
=== PAUSE TestAccOutpostsSitesDataSource_basic
=== CONT  TestAccOutpostsAssetDataSource_basic
=== CONT  TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
=== CONT  TestAccOutpostsOutpostDataSource_arn
=== CONT  TestAccOutpostsSiteDataSource_name
=== CONT  TestAccOutpostsDataSource_basic
=== CONT  TestAccOutpostsOutpostDataSource_name
=== CONT  TestAccOutpostsOutpostInstanceTypesDataSource_basic
=== CONT  TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
=== CONT  TestAccOutpostsSiteDataSource_id
=== CONT  TestAccOutpostsSitesDataSource_basic
=== CONT  TestAccOutpostsOutpostDataSource_ownerID
=== CONT  TestAccOutpostsOutpostDataSource_id
    outpost_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_id (0.78s)
=== NAME  TestAccOutpostsOutpostDataSource_ownerID
    outpost_data_source_test.go:106: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_ownerID (0.84s)
=== NAME  TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes
    outpost_instance_type_data_source_test.go:40: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypeDataSource_preferredInstanceTypes (0.84s)
=== NAME  TestAccOutpostsDataSource_basic
    outposts_data_source_test.go:21: skipping since no Outposts found
--- SKIP: TestAccOutpostsDataSource_basic (0.92s)
=== NAME  TestAccOutpostsOutpostInstanceTypesDataSource_basic
    outpost_instance_types_data_source_test.go:21: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypesDataSource_basic (0.92s)
=== NAME  TestAccOutpostsOutpostDataSource_arn
    outpost_data_source_test.go:79: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_arn (5.82s)
=== NAME  TestAccOutpostsSiteDataSource_id
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSiteDataSource_id (5.82s)
=== NAME  TestAccOutpostsOutpostDataSource_name
    outpost_data_source_test.go:52: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostDataSource_name (5.83s)
=== NAME  TestAccOutpostsOutpostInstanceTypeDataSource_instanceType
    outpost_instance_type_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsOutpostInstanceTypeDataSource_instanceType (5.91s)
=== NAME  TestAccOutpostsSitesDataSource_basic
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSitesDataSource_basic (5.92s)
=== NAME  TestAccOutpostsAssetDataSource_basic
    outpost_asset_data_source_test.go:20: skipping since no Outposts found
--- SKIP: TestAccOutpostsAssetDataSource_basic (5.94s)
=== NAME  TestAccOutpostsSiteDataSource_name
    sites_data_source_test.go:71: skipping since no Sites Outpost found
--- SKIP: TestAccOutpostsSiteDataSource_name (5.99s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/outposts	11.016s

@ewbankkit
Copy link
Contributor

@DanielRieske Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit c82cb69 into hashicorp:main Aug 19, 2024
46 checks passed
@github-actions github-actions bot added this to the v5.64.0 milestone Aug 19, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 20, 2024
Copy link

This functionality has been released in v5.63.1 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 Sep 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aws-sdk-go-migration Issues that are related to the providers migration to AWS SDK for Go v2. client-connections Pertains to the AWS Client and service connections. external-maintainer Contribution from a trusted external contributor. generators Relates to code generators. service/outposts Issues and PRs that pertain to the outposts service. tags Pertains to resource tagging. 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.

[AWS SDK for Go Migration] Outposts Service
2 participants