1050
Comment:
|
← Revision 3 as of 2022-05-17 04:36:41 ⇥
1292
|
Deletions are marked like this. | Additions are marked like this. |
Line 28: | Line 28: |
##Upgrade | |
Line 29: | Line 30: |
##Fix provider in state $ tg state replace-provider "registry.terraform.io/-/aws" "hashicorp/aws" |
|
Line 35: | Line 39: |
5. :( fix more errors {{{ This configuration or its associated state refers to the unqualified │ provider "aws". }}} |
Cloud/Terraform/UpgradeFrom0.13
- Older Terraform state files need a upgrade (format change) going past version 0.13.0
Steps
- Update terraform version to v0.13.7
State apply to test all is still good, fixing errors
Error
Initializing the backend... Error: error configuring S3 Backend: no valid credential sources for S3 Backend found. Please see https://www.terraform.io/docs/backends/types/s3.html for more information about providing credentials. Error: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors ERRO[0009] 1 error occurred: * exit status 1
Fix: Can't use sso, with old version set env vars.
export AWS_ACCESS_KEY_ID="AS...FB" export AWS_SECRET_ACCESS_KEY="PR...di" export AWS_SESSION_TOKEN="IQoJb......xJ/"
Run upgrade
$ tfswitch 0.13.7 ##Upgrade $ tg init && tg 0.13upgrade ##Fix provider in state $ tg state replace-provider "registry.terraform.io/-/aws" "hashicorp/aws"
Test newer version
$ tfswitch 1.1.9 $ tg init && tg plan
fix more errors
This configuration or its associated state refers to the unqualified │ provider "aws".