terraform-aws-tfstate-backend
terraform-aws-tfstate-backend copied to clipboard
terraform-provider-aws v4.0 incompatibility
Describe the Bug
Upgrading to the latest hashicorp/aws v4.0.0 (https://registry.terraform.io/providers/hashicorp/aws/latest) breaks terraform-aws-tfstate-backend with the following error:
$ terraform plan
Acquiring state lock. This may take a few moments...
Releasing state lock. This may take a few moments...
╷
│ Error: Unsupported attribute
│
│ on .terraform/modules/terraform_state_backend.log_storage/main.tf line 30, in resource "aws_s3_bucket" "default":
│ 30: for_each = var.enable_glacier_transition ? [1] : []
│
│ This object does not have an attribute named "enable_glacier_transition".
╵
╷
│ Error: Unsupported attribute
│
│ on .terraform/modules/terraform_state_backend.log_storage/main.tf line 44, in resource "aws_s3_bucket" "default":
│ 44: for_each = var.enable_glacier_transition ? [1] : []
│
│ This object does not have an attribute named "enable_glacier_transition".
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
$ terraform version
Terraform v1.1.5
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.0.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/time v0.7.2
Temporary solution:
Restricting AWS provider to 3.x gets the tfstate-backend plugin working as expected
$ cat versions.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 4.0"
}
...
is there any news with this?
Same issue here. It appears that there's already a PR #113 open. Any chance this can be expedited?