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

r/appsync_resolver - add support for js #28436

Merged
merged 7 commits into from
Dec 21, 2022

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Dec 17, 2022

Description

Relations

Closes #27873
Closes #28429

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccAppSync_serial/Resolver PKG=appsync
--- PASS: TestAccAppSync_serial (440.04s)
    --- PASS: TestAccAppSync_serial/Resolver (440.04s)
        --- PASS: TestAccAppSync_serial/Resolver/disappears (31.16s)
        --- PASS: TestAccAppSync_serial/Resolver/pipeline (34.79s)
        --- PASS: TestAccAppSync_serial/Resolver/responseTemplate (47.13s)
        --- PASS: TestAccAppSync_serial/Resolver/multipleResolvers (49.70s)
        --- PASS: TestAccAppSync_serial/Resolver/caching (30.77s)
        --- PASS: TestAccAppSync_serial/Resolver/basic (31.18s)
        --- PASS: TestAccAppSync_serial/Resolver/code (33.29s)
        --- PASS: TestAccAppSync_serial/Resolver/dataSource (46.78s)
        --- PASS: TestAccAppSync_serial/Resolver/DataSource_lambda (45.82s)
        --- PASS: TestAccAppSync_serial/Resolver/requestTemplate (49.98s)
        --- PASS: TestAccAppSync_serial/Resolver/sync (39.44s)

@github-actions
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 size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/appsync Issues and PRs that pertain to the appsync service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 17, 2022
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Dec 17, 2022
@DrFaust92 DrFaust92 added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 17, 2022
@DrFaust92 DrFaust92 marked this pull request as ready for review December 17, 2022 14:54
@Jimmy89
Copy link

Jimmy89 commented Dec 19, 2022

@DrFaust92 not sure if I need to put it in here, but I reported a bug to the pulumi aws provider about APPSYNC_JS that might be relevant for this PR: pulumi/pulumi-aws#2277
With the current terraform-provider-aws v4.47.0 (in combination with pulumi) using the runtime and code attributes does not change the requirement of the request_template template (which should be optional instead).

@DrFaust92
Copy link
Collaborator Author

Thanks @Jimmy89 for a quick glance at the test case in the ticket and test case I made for PR it should work for resolvers after this PR, I'll double check docs to make sure things that are optional are reflected in docs

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 TESTS=TestAccAppSync_serial/Resolver PKG=appsync
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/appsync/... -v -count 1 -parallel 20 -run='TestAccAppSync_serial/Resolver'  -timeout 180m
=== RUN   TestAccAppSync_serial
=== RUN   TestAccAppSync_serial/Resolver
=== RUN   TestAccAppSync_serial/Resolver/pipeline
=== RUN   TestAccAppSync_serial/Resolver/caching
=== RUN   TestAccAppSync_serial/Resolver/code
=== RUN   TestAccAppSync_serial/Resolver/dataSource
=== RUN   TestAccAppSync_serial/Resolver/DataSource_lambda
=== RUN   TestAccAppSync_serial/Resolver/requestTemplate
=== RUN   TestAccAppSync_serial/Resolver/responseTemplate
=== RUN   TestAccAppSync_serial/Resolver/basic
=== RUN   TestAccAppSync_serial/Resolver/disappears
=== RUN   TestAccAppSync_serial/Resolver/multipleResolvers
=== RUN   TestAccAppSync_serial/Resolver/sync
--- PASS: TestAccAppSync_serial (327.12s)
    --- PASS: TestAccAppSync_serial/Resolver (327.12s)
        --- PASS: TestAccAppSync_serial/Resolver/pipeline (27.10s)
        --- PASS: TestAccAppSync_serial/Resolver/caching (23.14s)
        --- PASS: TestAccAppSync_serial/Resolver/code (25.95s)
        --- PASS: TestAccAppSync_serial/Resolver/dataSource (34.63s)
        --- PASS: TestAccAppSync_serial/Resolver/DataSource_lambda (40.75s)
        --- PASS: TestAccAppSync_serial/Resolver/requestTemplate (31.91s)
        --- PASS: TestAccAppSync_serial/Resolver/responseTemplate (31.39s)
        --- PASS: TestAccAppSync_serial/Resolver/basic (23.16s)
        --- PASS: TestAccAppSync_serial/Resolver/disappears (17.84s)
        --- PASS: TestAccAppSync_serial/Resolver/multipleResolvers (33.82s)
        --- PASS: TestAccAppSync_serial/Resolver/sync (37.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/appsync	332.558s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 12d1458 into hashicorp:main Dec 21, 2022
@github-actions github-actions bot added this to the v4.49.0 milestone Dec 21, 2022
Comment on lines +41 to +44
"caching_config": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

👋 been going through PRs to learn and I've noticed a lot of these where the type is TypeList and the MaxItems is 1 item of type map. We then have expand functions which always expects a list of one map item. What is this pattern? Why can't the type be TypeMap instead?

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

This functionality has been released in v4.49.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

github-actions bot commented Feb 5, 2023

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 Feb 5, 2023
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. enhancement Requests to existing resources that expand the functionality or scope. service/appsync Issues and PRs that pertain to the appsync service. size/L 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
4 participants