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

d/aws_api_gateway_api_keys: new data source #39335

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wirkijowski
Copy link

@wirkijowski wirkijowski commented Sep 15, 2024

Description

New data source to get pre-existing API Key list.

Relations

Resolves #8033

References

https://docs.aws.amazon.com/apigateway/latest/api/API_GetApiKeys.html

Output from Acceptance Testing

% make testacc TESTS=TestAccAPIGatewayAPIKeysDataSource_ PKG=apigateway
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/apigateway/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayAPIKeysDataSource_'  -timeout 360m
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial
=== PAUSE TestAccAPIGatewayAPIKeysDataSource_serial
=== CONT  TestAccAPIGatewayAPIKeysDataSource_serial
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/basic
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/includeValues
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/manyKeys
--- PASS: TestAccAPIGatewayAPIKeysDataSource_serial (36.96s)
    --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys (36.96s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/basic (12.72s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/includeValues (11.83s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/manyKeys (12.40s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigateway 43.194s

@wirkijowski wirkijowski requested a review from a team as a code owner September 15, 2024 07:57
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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/apigateway Issues and PRs that pertain to the apigateway service. generators Relates to code generators. needs-triage Waiting for first response or review from a maintainer. labels Sep 15, 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 @wirkijowski 👋

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! 😃

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Sep 16, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

Hi @wirkijowski - Thanks for your submission!

As of 2023-10-20 all net-new data sources are required to use Terraform Plugin Framework. More context is available in this pinned issue and the provider contributor guide.

Maintainers will convert Plugin-SDK based data sources as part of the review process, but if you'd like to do the conversion in the meantime we would greatly appreciate it!

@wirkijowski
Copy link
Author

Hi @jar-b - thanks for the feedback. I'm going to convert this.

@wirkijowski
Copy link
Author

I've converted from plugin sdk to framweork. Also re-ran acceptance tests:

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/apigateway/... -v -count 1 -parallel 20 -run='TestAccAPIGatewayAPIKeysDataSource_'  -timeout 360m
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial
=== PAUSE TestAccAPIGatewayAPIKeysDataSource_serial
=== CONT  TestAccAPIGatewayAPIKeysDataSource_serial
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/includeValues
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/manyKeys
=== RUN   TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/basic
--- PASS: TestAccAPIGatewayAPIKeysDataSource_serial (37.38s)
    --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys (37.38s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/includeValues (12.67s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/manyKeys (12.50s)
        --- PASS: TestAccAPIGatewayAPIKeysDataSource_serial/APIKeys/basic (12.21s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/apigateway 43.754s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. service/apigateway Issues and PRs that pertain to the apigateway 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.

Data source aws_api_gateway_api_key lookup on name (not id)
2 participants