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

feat: Add cache_config arg for aws_amplify_app #39215

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Sep 8, 2024

Description

This PR is to add the cache_config configuration block argument to the aws_amplify_app resource.

Relations

Closes #38864

References

Referred to CreateApp for specs and wordings.

Output from Acceptance Testing

$ make testacc TESTS="TestAccAmplify_serial/App/basic|TestAccAmplify_serial/App/CacheConfig" PKG=amplify
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/amplify/... -v -count 1 -parallel 20 -run='TestAccAmplify_serial/App/basic|TestAccAmplify_serial/App/CacheConfig'  -timeout 360m
=== RUN   TestAccAmplify_serial
=== PAUSE TestAccAmplify_serial
=== CONT  TestAccAmplify_serial
=== RUN   TestAccAmplify_serial/App
=== RUN   TestAccAmplify_serial/App/CacheConfig
=== RUN   TestAccAmplify_serial/App/basic
--- PASS: TestAccAmplify_serial (591.42s)
    --- PASS: TestAccAmplify_serial/App (591.42s)
        --- PASS: TestAccAmplify_serial/App/CacheConfig (301.43s)
        --- PASS: TestAccAmplify_serial/App/basic (289.99s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/amplify    591.661s

$

@acwwat acwwat requested a review from a team as a code owner September 8, 2024 23:25
Copy link

github-actions bot commented Sep 8, 2024

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/amplify Issues and PRs that pertain to the amplify service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Sep 8, 2024
@acwwat acwwat force-pushed the f-aws_amplify_app-add_cache_config_arg branch from 0c5fe85 to c14a762 Compare September 8, 2024 23:26
@acwwat acwwat force-pushed the f-aws_amplify_app-add_cache_config_arg branch from c14a762 to 4a0817f Compare September 8, 2024 23:27
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Sep 11, 2024
@jar-b jar-b self-assigned this Sep 11, 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 11, 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.

LGTM 🎉

%  make testacc PKG=amplify TESTS=TestAccAmplify_serial/App
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/amplify/... -v -count 1 -parallel 20 -run='TestAccAmplify_serial/App'  -timeout 360m
=== RUN   TestAccAmplify_serial
=== PAUSE TestAccAmplify_serial
=== CONT  TestAccAmplify_serial
=== RUN   TestAccAmplify_serial/App
=== RUN   TestAccAmplify_serial/App/Description
=== RUN   TestAccAmplify_serial/App/EnvironmentVariables
    app_test.go:427: Step 4/4 error: Error running apply: exit status 1

        Error: updating Amplify App (d2rf7akle3rllz): operation error Amplify: UpdateApp, https response error StatusCode: 400, RequestID: 8f1429d1-9a62-4464-b4e3-14369e5c0e67, BadRequestException: Environment variables cannot have an empty key.

          with aws_amplify_app.test,
          on terraform_plugin_test.tf line 12, in resource "aws_amplify_app" "test":
          12: resource "aws_amplify_app" "test" {

=== RUN   TestAccAmplify_serial/App/Name
=== RUN   TestAccAmplify_serial/App/disappears
=== RUN   TestAccAmplify_serial/App/tags
=== RUN   TestAccAmplify_serial/App/tags/basic
=== RUN   TestAccAmplify_serial/App/tags/null
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Add
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_updateToResourceOnly
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Replace
=== RUN   TestAccAmplify_serial/App/tags/AddOnUpdate
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnCreate
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Replace
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_updateToProviderOnly
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nonOverlapping
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_emptyResourceTag
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnCreate
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_providerOnly
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_overlapping
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Add
=== RUN   TestAccAmplify_serial/App/BasicAuthCredentials
    app_test.go:206: Step 1/4 error: Check failed: Check 2/3 error: aws_amplify_app.test: Attribute 'basic_auth_credentials' expected "dXNlcm5hbWUxOnBhc3N3b3JkMQ==", got "dXNlcm5hbWUxOlRZTFpncVYrM1NpVlZFak5LeWxFQmc9PXx8dVF3WnlpalhOL2xNaWVYQUVCVnVGNkJKWFhPOGFRaFBBVnlBa2MwL1IwTT0="
=== RUN   TestAccAmplify_serial/App/CacheConfig
=== RUN   TestAccAmplify_serial/App/CustomRules
=== RUN   TestAccAmplify_serial/App/IamServiceRole
=== RUN   TestAccAmplify_serial/App/Repository
    app_test.go:552: Environment variable AMPLIFY_GITHUB_ACCESS_TOKEN is not set
=== RUN   TestAccAmplify_serial/App/basic
=== RUN   TestAccAmplify_serial/App/AutoBranchCreationConfig
    app_test.go:109: Step 2/5 error: Check failed: Check 3/16 error: aws_amplify_app.test: Attribute 'auto_branch_creation_config.0.basic_auth_credentials' expected "dXNlcm5hbWUxOnBhc3N3b3JkMQ==", got "dXNlcm5hbWUxOm5kb2YwbGNzczFjV0FMMytVRlBZQXc9PXx8bmd5UTFuUlRSRTYrM2k0NjJUS1VaVTBzNS93ODhGS0llTzE1bjV6Vm9JND0="
=== RUN   TestAccAmplify_serial/App/BuildSpec
--- FAIL: TestAccAmplify_serial (7740.87s)
    --- FAIL: TestAccAmplify_serial/App (7740.87s)
        --- PASS: TestAccAmplify_serial/App/Description (300.52s)
        --- FAIL: TestAccAmplify_serial/App/EnvironmentVariables (24.48s)
        --- PASS: TestAccAmplify_serial/App/Name (291.11s)
        --- PASS: TestAccAmplify_serial/App/disappears (281.79s)
        --- PASS: TestAccAmplify_serial/App/tags (5340.11s)
            --- PASS: TestAccAmplify_serial/App/tags/basic (320.35s)
            --- PASS: TestAccAmplify_serial/App/tags/null (288.57s)
            --- PASS: TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Add (306.19s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_updateToResourceOnly (293.07s)
            --- PASS: TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Replace (297.27s)
            --- PASS: TestAccAmplify_serial/App/tags/AddOnUpdate (295.27s)
            --- PASS: TestAccAmplify_serial/App/tags/EmptyTag_OnCreate (296.85s)
            --- PASS: TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Replace (294.10s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_updateToProviderOnly (294.74s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_nonOverlapping (309.30s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_emptyResourceTag (285.42s)
            --- PASS: TestAccAmplify_serial/App/tags/ComputedTag_OnCreate (288.05s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_providerOnly (322.09s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_overlapping (310.30s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_nullOverlappingResourceTag (285.66s)
            --- PASS: TestAccAmplify_serial/App/tags/DefaultTags_nullNonOverlappingResourceTag (285.43s)
            --- PASS: TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Add (297.45s)
        --- FAIL: TestAccAmplify_serial/App/BasicAuthCredentials (9.51s)
        --- PASS: TestAccAmplify_serial/App/CacheConfig (292.53s)
        --- PASS: TestAccAmplify_serial/App/CustomRules (301.33s)
        --- PASS: TestAccAmplify_serial/App/IamServiceRole (301.12s)
        --- SKIP: TestAccAmplify_serial/App/Repository (0.00s)
        --- PASS: TestAccAmplify_serial/App/basic (283.92s)
        --- FAIL: TestAccAmplify_serial/App/AutoBranchCreationConfig (16.19s)
        --- PASS: TestAccAmplify_serial/App/BuildSpec (298.27s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/amplify    7747.018s

Failures are pre-existing and not related to this change.

@jar-b
Copy link
Member

jar-b commented Sep 11, 2024

Thanks for your contribution, @acwwat! 👍

@jar-b jar-b merged commit 8d73939 into hashicorp:main Sep 11, 2024
46 checks passed
@github-actions github-actions bot added this to the v5.67.0 milestone Sep 11, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 13, 2024
Copy link

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

@acwwat acwwat deleted the f-aws_amplify_app-add_cache_config_arg branch September 16, 2024 00:12
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 16, 2024
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. external-maintainer Contribution from a trusted external contributor. service/amplify Issues and PRs that pertain to the amplify 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.

[Enhancement]: r/aws_amplify_app: Add cache_config argument
2 participants