Skip to content

Commit a46b073

Browse files
VIA-579 AJ Upgrade infrastructure (missed iam lock file upgrade) and add steps to README
1 parent 4289f5a commit a46b073

File tree

2 files changed

+40
-17
lines changed

2 files changed

+40
-17
lines changed

infrastructure/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,25 @@ Use the steps below to deploy with restricted role instead of administrator, in
278278
AWS_PROFILE=my-assumed-role AWS_REGION=eu-west-2 TF_ENV=dev make terraform-apply
279279
```
280280

281+
## Terraform upgrade
282+
283+
To upgrade terraform itself and its module versions, it requires careful process
284+
285+
- go to infrastructure/environments/dev directory
286+
- reset local environment
287+
- cleanup local - delete .terraform directory in the dev folder to remove previous local copies
288+
- initialise your workspace - terraform init and terraform workspace select <your 4-letter code>
289+
- build and deploy to your workspace
290+
- npm run local-build-package (only once as the code is not changing for this process)
291+
- terraform apply (don't actually apply)
292+
- repeat the following for each incremental upgrade
293+
- upgrade - starting with the provider and then moving to third party modules, bump the version to next major version
294+
- do the "reset local environment" steps above
295+
- terraform init --upgrade
296+
- terraform providers lock -platform=linux_amd64 -platform=linux_arm64q
297+
- do the "build and deploy to your workspace" steps above
298+
- expect that no changes to your infrastructure are needed
299+
281300
## OpenNext
282301

283302
OpenNext takes the Next.js build output and converts it into packages that can be deployed across a variety of environments.

infrastructure/environments/dev/iam/.terraform.lock.hcl

Lines changed: 21 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)