Error: Failed to install providers

Am getting the below error while running terraform. Can anyone please help to solve on this

Error: Failed to install providers

Could not find required providers, but found possible alternatives:

hashicorp/openstack -> terraform-providers/openstack

If these suggestions look correct, upgrade your configuration with the

following command:

terraform 0.13upgrade modules/broker/base/prod

@vijaytakkoli it looks like you’re using configuration code written for terraform version lower than 0.13, but your current CLI version is 0.13 or greater.

There were introduced several changes to syntax with version upgrade, the reference to providers is the one of them.

The easy way to workaround this: backup your source code and run suggested command terraform 0.13upgrade modules/broker/base/prod. The output will show the files changed and you can browse them to see the difference.

Thanks for your response. I tried by giving terraform 0.13 version in our drone yml file but still it is failing with same error.Apart from running the command which u said , is there any other way to fix this?

I tried by giving terraform 0.13 version in our drone yml file but still it is failing with same error

@vijaytakkoli, this is exactly why you see the error message with suggestion about terraform 0.13upgrade – your Terraform CLI application version is 0.13 or higher. I suppose you have it defined in the drone pipeline configuration or it’s default for your environment.

You might try to specify / use lower version of Terraform CLI (i.e. the latest one from 0.12.x) in your pipeline if you don’t want to change the code. I suggest testing this locally first: install Terraform 0.12.x on your machine and run terraform init, then terraform validate (inside your configuration directory root) to make sure you have the correct match between CLI version and the code.

My previous reply contains the link to documentation which describes your case in details.

Thanks very much. I downloaded 0.13 version and ran terraform 0.13upgrade modules/broker/base/prod which solved the issue