Terraform plan function giving error "incompatible API"

echhhmn@IN-00214213:~/Terraform/20012022/GCP_Networking/resource_definitions/edp-vpc$ terraform plan
Acquiring state lock. This may take a few moments…
Releasing state lock. This may take a few moments…

Error: Error asking for user input: 1 error(s) occurred:

  • provider.external: Incompatible API version with plugin. Plugin version: 5, Core version: 4


Hi @chauhanhimanshu92,

It looks like you are using a very old version of Terraform which is not supported by the providers you have. You will either need to upgrade the version of Terraform, or downgrade the providers to a compatible version.

how may I downgrade the provider versions ?

You just need to set the versions of the different providers to whatever is the correct version you want to use.

What version of Terraform are you currently using? Is there a reason you wouldn’t look to upgrade that?

hi i am using below ones , how to know what versions are compatible with the provider one

echhhmn@IN-00214213:/$ terraform version
Terraform v0.11.8

Your version of Terraform is out of date! The latest version
is 1.1.4. You can update by downloading from Downloads | Terraform by HashiCorp

I would recommend upgrading your Terraform as it is very old and would only be compatible with providers that are also very old - meaning they may no longer fully work or have features you need.

To upgrade you will need to step through a few upgrade processes (as 0.11 is so old) which is explained in the Terraform upgrade guides.

hi , the issue got auto healed for me without downgrading the provider plugins
neither i did upgraded the Terraform to latest version

Its quite unusual for me as it resolved auto last time as well

Upgrading terraform requires lot of syntax change and it is a time taking procedure. As of now we are looking for the provider versions that are compatible with our Terraform version v0.11.8.
Can you please help with that ?

If you install providers automatically using terraform init then it should automatically select compatible versions, and exclude incompatible versions.

Once that install is complete, you can run terraform providers to see which versions Terraform selected.

If you are doing this in an existing working directory then you’ll need to delete the .terraform/plugins directory first, or else terraform init will try to re-use the providers already installed, which are apparently not compatible.