-
Notifications
You must be signed in to change notification settings - Fork 10k
Open
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.
Description
Terraform and AWS Provider Version
Terraform v1.14.6
on linux_amd64
+ provider registry.terraform.io/grafana/grafana v4.27.0
+ provider registry.terraform.io/hashicorp/aws v6.35.0
+ provider registry.terraform.io/hashicorp/external v2.3.5
+ provider registry.terraform.io/hashicorp/kubernetes v2.38.0
+ provider registry.terraform.io/hashicorp/random v3.8.1Affected Resource(s) or Data Source(s)
aws_s3_bucket_lifecycle_configuration
Expected Behavior
terraform plan is successful
Actual Behavior
terraform plan errors with messages about Incompatible Types
This worked fine in 6.34.0, but started failing in 6.35.0
Relevant Error/Panic Output
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Incompatible Types
│
│ with aws_s3_bucket_lifecycle_configuration.delete_certs_after_ninety_days,
│ on bucket.tf line 22, in resource "aws_s3_bucket_lifecycle_configuration" "delete_certs_after_ninety_days":
│ 22: resource "aws_s3_bucket_lifecycle_configuration" "delete_certs_after_ninety_days" {
│
│ An unexpected error occurred while flattening configuration. This is always
│ an error in the provider. Please report the following to the provider
│ developer:
│
│ Source type
│ "*github.com/aws/aws-sdk-go-v2/service/s3/types.LifecycleRuleAndOperator"
│ cannot be flattened to target type
│ "github.com/hashicorp/terraform-provider-aws/internal/service/s3.lifecycleRuleAndOperatorModel".
╵Sample Terraform Configuration
Click to expand configuration
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "6.35.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "example" {
bucket = "example-lifecycle-and-filter-bug-12345"
}
resource "aws_s3_bucket_lifecycle_configuration" "example" {
bucket = aws_s3_bucket.example.id
rule {
id = "expire_after_ninety_days"
filter {
and {
prefix = "certs/"
object_size_greater_than = 1
}
}
status = "Enabled"
expiration {
days = 90
}
}
}
Steps to Reproduce
terraform init
terraform planDebug Logging
Click to expand log output
GenAI / LLM Assisted Development
n/a
Important Facts and References
Regressed in 6.35.0
Would you like to implement a fix?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.Waiting for first response or review from a maintainer.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.