Ever since we upgraded to terraform 1.7.1, we started seeing this error:
Initializing the backend...
╷
│ Error: failed to get shared config profile, ***********
│
│
╵
╷
│ Error: Backend initialization required, please run "terraform init"
│
│ Reason: Initial configuration of the requested backend "s3"
│
│ The "backend" is the interface that Terraform uses to store state,
│ perform operations, etc. If this message is showing up, it means that the
│ Terraform configuration you're using is using a custom configuration for
│ the Terraform backend.
│
│ Changes to backend configurations require reinitialization. This allows
│ Terraform to set up the new configuration, copy existing state, etc. Please
│ run
│ "terraform init" with either the "-reconfigure" or "-migrate-state" flags
│ to
│ use the current configuration.
│
│ If the change reason above is incorrect, please verify your configuration
│ hasn't changed and try again. At this point, no changes to your existing
│ configuration or state have been made.
This does not happen in terraform 1.6.5. We use the AWS provider 5.35.0+, and our backend is S3:
terraform {
backend "s3" {
encrypt = true
}
required_version = "= 1.6.5"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.35.0"
}
}
}
This looks like a regression in 1.7.1 and 1.7.2.