[Docs]: Add support for package version overrides on aws_amplify_app resource #27768
Labels
documentation
Introduces or discusses updates to documentation.
good first issue
Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
service/amplify
Issues and PRs that pertain to the amplify service.
Documentation Link
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_app
Description
As stated on the AWS official Amplify Build Settings docs the Node version used is the latest one unless something else is specified on the
package.json
. While having on Amplify a different version than thepackage.json
file could be not the best practice, there might be a need for overriding this for some builds. The steps for doing this are very well explained on the official AWS next (with Next.js instead of Node but still the same) Updating the Next.js version for an existing app.While looking at the aws_amplify_app docs there are no indications about how to do that, so we usually ended up adding this manually and getting the changes from the plan. What essentially is needed, is to add the following code block
Used as the following example:
Note 1: Please note that this might not only apply for Node.js versions but for other package version overrides as the ones that are allowed on Amplify
Note 2: If you think about it, the
_LIVE_UPDATES
env-var could also be an independent map outside the environment_variables and moreover could be a standalone resource to override package versions.References
Build Settings
Updating the Next.js version for an existing app
Relates to #27319
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: