-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.
Milestone
Description
Terraform Core Version
1.10
AWS Provider Version
5.86.0
Affected Resource(s)
- aws_s3_bucket_lifecycle_configuration
- aws_s3_bucket
Expected Behavior
When creating an S3 bucket and lifecycle configuration policy there should be no error
Actual Behavior
Getting:
│ Error: creating S3 Bucket (my-bucket) Lifecycle Configuration
│
│ with module.bucket.aws_s3_bucket_lifecycle_configuration.xxx,
│ on ../modules/bucket/main.tf line 93, in resource "aws_s3_bucket_lifecycle_configuration" "xxx":
│ 93: resource "aws_s3_bucket_lifecycle_configuration" "xxx" {
│
│ couldn't find resource
Relevant Error/Panic Output Snippet
Terraform Configuration Files
I've had failures with 2 different lifecylce configurations, I've shown them both here, but I don't think the rule's are the problem
resource "aws_s3_bucket" "xxx" {
bucket = "my-bucket"
tags = {
Name = "name"
}
}
resource "aws_s3_bucket_lifecycle_configuration" "xxx" {
bucket = aws_s3_bucket.xxx.id
rule {
id = "Retain last 30 days"
# Expires after 30 days
expiration {
days = 30
}
# Deleted 1 day after expiration
noncurrent_version_expiration {
noncurrent_days = 1
}
status = "Enabled"
}
}
# OR
resource "aws_s3_bucket_lifecycle_configuration" "xxx" {
bucket = aws_s3_bucket.xxx.id
rule {
id = "Archive to Glacier Deep Archive"
transition {
days = 30
storage_class = "DEEP_ARCHIVE"
}
status = "Enabled"
}
}Steps to Reproduce
⬇️ ⬇️ See my comment below with a minimal repo ⬇️ ⬇️
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
clarity-jason, Vino-Bala, patrickherrera, mariebo, chance-coleman and 10 more
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/s3Issues and PRs that pertain to the s3 service.Issues and PRs that pertain to the s3 service.