I am handling an slightly old terraform project using terraform 0.12.29
% terraform version
Terraform v0.12.29
When running terraform init, I got this error:
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "okta" (terraform-providers/okta) 3.10.1...
- Downloading plugin for provider "null" (hashicorp/null) 3.1.0...
- Downloading plugin for provider "template" (hashicorp/template) 2.2.0...
- Downloading plugin for provider "tls" (hashicorp/tls) 3.1.0...
- Downloading plugin for provider "datadog" (terraform-providers/datadog) 2.22.0...
- Downloading plugin for provider "archive" (hashicorp/archive) 2.1.0...
No provider "aws" plugins meet the constraint "2.53.0,2.53.0,2.53.0,2.53.0,2.53.0,2.53.0,2.53.0,>= 2.65,>= 2.70,~> 2.35,~> 2.35,~> 2.35,~> 2.35,~> 2.35,~> 2.35".
The version constraint is derived from the "version" argument within the
provider "aws" block in configuration. Child modules may also apply
provider version constraints. To view the provider versions requested by each
module in the current configuration, run "terraform providers".
To proceed, the version constraints for this provider must be relaxed by
either adjusting or removing the "version" argument in the provider blocks
throughout the configuration.
- Downloading plugin for provider "dns" (hashicorp/dns) 3.1.0...
Below is my provider AWS:
provider "aws" {
shared_credentials_file = "~/.aws/credentials"
profile = "management-admin"
region = var.region
alias = "management"
version = "2.53.0"
}
The error does not actually make sense to me. I tried changing the version 2.53.0 to newer version and each time different pluggin would then throw the same error.
I tried terraform init -upgrade as well but still the same.
What would have cause this and what are my options.