0

Hello I'm newbie for terraform, I started using terraform official documentation, but I'm facing an issue with in terraform init

getting an error like this.

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...

Provider {"aws"} v1.60.0 is not compatible with Terraform 0.12.15.

Provider version 2.7.0 is the earliest compatible version. Select it with
the following version constraint:

        version = "~> 2.7"

Terraform checked all of the plugin versions matching the given constraint:
    ~> 1.7

Consult the documentation for this provider for more information on
compatibility between provider and Terraform versions.


Error: incompatible provider version

How to fix it this issue. terraform version

C:\terraform>terraform -v
Terraform v0.12.15

1 Answer 1

0

This is working as expected, you'll need to upgrade the AWS provider.

It is recommended to use version constraints when configuring Terraform providers.

Add a line in your provider configuration like below:

provider "aws" {
  # ... other configuration ...

  version = "~> 2.7"
}

If you are following that recommendation, update the version constraints in your Terraform configuration and run terraform init to download the new version.

There is a caveat about upgrading to the latest 1.X version before upgrading to 2.x. See the upgrade reference below for instructions.

References

Provider "aws" v1.60.0 is not compatible with Terraform 0.12.3
AWS Provider Version 2 Upgrade Guide

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .