terraform-aws-s3-bucket
terraform-aws-s3-bucket copied to clipboard
fix: use for_each instead of count in aws_s3_bucket_logging
what
Replaced the count with a for_each inside aws_s3_bucket_logging.default
there's no point in the try since the type is clearly defined as list
why
When the bucket_name
within logging
attribute is dynamically defined, like in the case of referencing a bucket created by terraform for logging
logging = [
{
bucket_name = module.logging_bucket.bucket_id
prefix = "data/"
}
]
we get this error
For each can work better in this case and will solve the previous error
references
/terratest
/terratest
@hans-d done
/terratest