Upgrage to terraform 0.13

I’m new to terraform and I’m receiving this error code. The research I have found says I should use this command terraform 0.13upgrade but its not working. Can someone help on clearing this error.

Error: Invalid legacy provider address

│ This configuration or its associated state refers to the unqualified provider “azurerm”.

│ You must complete the Terraform 0.13 upgrade process before upgrading to later versions.


Have you read Upgrading to Terraform v0.13 | Terraform by HashiCorp ?

Hi @germainesimon22,

Note that the command you mentioned is available only in the Terraform v0.13 releases, so you should make sure you are using the latest v0.13 patch release to complete the upgrade process.

If that isn’t the problem you are seeing then please share some more details about what exactly is happening when you run the upgrade command.

Yes I tried running the terraform 0.13upgrade command but got a error Error: Invalid legacy provider address.

Hi @germainesimon22,

Please share the entire error message as Terraform returned it. That will allow us to see what part of the upgrade process returned the error. Thanks!

So, I need to grab the 0.13 and 0.14 binaries from github to move to the latest version?

Hi @Armature_Aaron,

You will need to use Terraform v0.13 to upgrade from Terraform v0.12.

Once you’ve completed the v0.13 upgrade steps there are no special upgrade helper commands in subsequent versions, and so you may be able to skip directly from v0.13 to the latest v1.1. The upgrade guide suggests stopping at Terraform v0.14 first before jumping to latest to confirm that the v0.13 upgrade was fully successful (so Terraform is no longer relying on the upgrade logic) but there’s no harm in trying the latest v1.x release instead to see if it works, and only stopping on v0.14 if you encounter any problems skipping ahead.

I correct the problem by commenting out the backend modules and using the kubernetes module.