I am trying to upgrade my terraform version from 0.13.7 to 0.14 but get this error when moving to version 0.14:
Error: Invalid legacy provider address
This configuration or its associated state refers to the unqualified provider
"aws".
You must complete the Terraform 0.13 upgrade process before upgrading to later
versions.
Error: Terraform exited with code 1.
Error: Process completed with exit code 1.
I have tried everything i can find online about this error. I have done:
terraform state replace-provider "registry.terraform.io/-/aws" "hashicorp/aws"
What else is the issue? What else can I try?
UPDATE: my required providers block:
terraform {
required_version = ">= 0.13"
required_providers {
archive = {
source = "hashicorp/archive"
}
aws = {
source = "hashicorp/aws"
}
local = {
source = "hashicorp/local"
}
random = {
source = "hashicorp/random"
}
template = {
source = "hashicorp/template"
}
vault = {
source = "hashicorp/vault"
}
}
}
Found the answer on this post
TL;DR - Have to select workspace in the terraform init command.