Skip to content

feat: add support for job_config #43136

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

Conversation

stefanfreitag
Copy link
Contributor

@stefanfreitag stefanfreitag commented Jun 22, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

None.

Description

As mentioned in #43126 users can specify the build compute type for Amplify Apps.

AWS introduced a job configuration object (JobConfig) and made BuildComputeType part of it.

Supported values for BuildComputeType are STANDARD_8GB, LARGE_16GB, and XLARGE_72GB. If no value is specified by user, Amplify uses the STANDARD_8GB default.

Additional change in the test code

During test execution I noticed that TestAccApp_basic fails with

2025/06/23 18:42:24 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccApp_basic
    app_test.go:33: Step 1/2 error: Check failed: Check 9/28 error: aws_amplify_app.test: Attribute 'cache_config.0.type' expected "AMPLIFY_MANAGED", got "AMPLIFY_MANAGED_NO_COOKIES"
--- FAIL: TestAccApp_basic (15.31s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/amplify    15.503s
FAIL
make: *** [GNUmakefile:643: testacc] Error 1

this is due to the fact that the default value for the cache config type is AMPLIFY_MANAGED_NO_COOKIES and not AMPLIFY_MANAGED. This is documented here. The check has been updated to reflect this.

Relations

Closes #43126

References

Output from Acceptance Testing

There seems to be an issue with test checking on basic_auth_credentials (have not touched this). Looks like the API returns no longer the username/password combination, but username/ hash.

The execution of all Amplify-related tests is still ongoing on my (slow) system. Would be cool, if you can run the tests on your end. Current status on my end is as below.
The new test TestAccAmplify_serial/App/JobConfig for the feature succeeds without error.

make testacc TESTS=TestAccAmplify_serial  PKG=amplify
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/amplify/... -v -count 1 -parallel 20 -run='TestAccAmplify_serial'  -timeout 360m -vet=off
2025/06/23 18:54:10 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/23 18:54:10 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccAmplify_serial
=== PAUSE TestAccAmplify_serial
=== CONT  TestAccAmplify_serial
=== RUN   TestAccAmplify_serial/Webhook
=== RUN   TestAccAmplify_serial/Webhook/basic
=== RUN   TestAccAmplify_serial/Webhook/disappears
=== RUN   TestAccAmplify_serial/Webhook/update
=== RUN   TestAccAmplify_serial/App
=== RUN   TestAccAmplify_serial/App/Description
=== RUN   TestAccAmplify_serial/App/Repository
    app_test.go:676: Environment variable AMPLIFY_GITHUB_ACCESS_TOKEN is not set
=== RUN   TestAccAmplify_serial/App/basic
=== RUN   TestAccAmplify_serial/App/BasicAuthCredentials
    app_test.go:208: Step 1/4 error: Check failed: Check 2/3 error: aws_amplify_app.test: Attribute 'basic_auth_credentials' expected "dXNlcm5hbWUxOnBhc3N3b3JkMQ==", got "dXNlcm5hbWUxOk0rYlIvbFlISkFneExBbWp5ZEdQd0E9PXx8NG1RR1k2cjJuU242UFFINDlaVzNwa1pUQTIwV2c2U3VOMlA4QmF0TGM0UT0="
=== RUN   TestAccAmplify_serial/App/CustomRules
=== RUN   TestAccAmplify_serial/App/EnvironmentVariables
=== RUN   TestAccAmplify_serial/App/IamServiceRole
=== RUN   TestAccAmplify_serial/App/JobConfig
=== RUN   TestAccAmplify_serial/App/Name
=== RUN   TestAccAmplify_serial/App/disappears
=== RUN   TestAccAmplify_serial/App/tags
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Add
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnUpdate_Replace
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_providerOnly
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_overlapping
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_updateToResourceOnly
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_emptyResourceTag
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccAmplify_serial/App/tags/IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccAmplify_serial/App/tags/basic
=== RUN   TestAccAmplify_serial/App/tags/null
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnCreate
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Add
=== RUN   TestAccAmplify_serial/App/tags/EmptyMap
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_nonOverlapping
=== RUN   TestAccAmplify_serial/App/tags/DefaultTags_updateToProviderOnly
=== RUN   TestAccAmplify_serial/App/tags/ComputedTag_OnUpdate_Replace
=== RUN   TestAccAmplify_serial/App/tags/IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccAmplify_serial/App/tags/AddOnUpdate
=== RUN   TestAccAmplify_serial/App/tags/EmptyTag_OnCreate
=== RUN   TestAccAmplify_serial/App/AutoBranchCreationConfig
    app_test.go:112: 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 "dXNlcm5hbWUxOktVTTRscUQ4TWhXTVB0VllmbnhYcmc9PXx8aUF1NHdyaVpFNFVCYWhVd0dlZ0pGWm1oVzZIR1pBNlM4TmYzOXJhSVFVUT0="
=== RUN   TestAccAmplify_serial/App/BuildSpec
=== RUN   TestAccAmplify_serial/App/BuildSpec
=== RUN   TestAccAmplify_serial/App/CacheConfig
=== RUN   TestAccAmplify_serial/App/ComputeRole
=== RUN   TestAccAmplify_serial/BackendEnvironment
=== RUN   TestAccAmplify_serial/BackendEnvironment/basic
=== RUN   TestAccAmplify_serial/BackendEnvironment/disappears
=== RUN   TestAccAmplify_serial/BackendEnvironment/DeploymentArtifacts_StackName
Copy link

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. 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. size/M Managed by automation to categorize the size of a PR. external-maintainer Contribution from a trusted external contributor. labels Jun 22, 2025
@stefanfreitag stefanfreitag marked this pull request as ready for review June 23, 2025 20:16
@stefanfreitag stefanfreitag requested a review from a team as a code owner June 23, 2025 20:16
@justinretzolk justinretzolk 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 Jun 24, 2025
@ewbankkit ewbankkit self-assigned this Jun 25, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 25, 2025
ewbankkit
ewbankkit previously approved these changes Jun 25, 2025
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=TestAccAmplify_serial/^App$$/basic\|TestAccAmplify_serial/^App$$/JobConfig' PKG=amplify
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/amplify/... -v -count 1 -parallel 20  -run=TestAccAmplify_serial/^App$/basic\|TestAccAmplify_serial/^App$/JobConfig -timeout 360m -vet=off
2025/06/25 11:02:06 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/25 11:02:06 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccAmplify_serial
=== PAUSE TestAccAmplify_serial
=== CONT  TestAccAmplify_serial
=== RUN   TestAccAmplify_serial/App
=== RUN   TestAccAmplify_serial/App/basic
=== RUN   TestAccAmplify_serial/App/JobConfig
--- PASS: TestAccAmplify_serial (574.56s)
    --- PASS: TestAccAmplify_serial/App (574.56s)
        --- PASS: TestAccAmplify_serial/App/basic (283.88s)
        --- PASS: TestAccAmplify_serial/App/JobConfig (290.68s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/amplify	579.371s
jar-b
jar-b previously approved these changes Jun 26, 2025
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 🚀

@jar-b jar-b dismissed stale reviews from ewbankkit and themself via ae97b91 June 26, 2025 14:23
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 🚀.

@ewbankkit ewbankkit merged commit da19676 into hashicorp:main Jun 26, 2025
45 checks passed
@ewbankkit
Copy link
Contributor

@stefanfreitag Thanks for the contribution 🎉 👏.

Copy link

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.1.0 milestone Jun 26, 2025
Copy link

This functionality has been released in v6.1.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 26, 2025
@stefanfreitag stefanfreitag deleted the f-aws_amplify_app-add-build-compute-type branch June 26, 2025 18:43
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. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. service/amplify Issues and PRs that pertain to the amplify service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
4 participants