"Unsupported attribute" on access_logs module
I am trying to create a website using the example from the module `terraform-aws-service-catalog.git//modules/services/public-static-website?ref=v0.75.0`. I got the following error: ``` │ Error: Unsupported attribute │ │ on .terraform/modules/static_website.cloudfront.access_logs/modules/private-s3-bucket/main.tf line 67, in resource "aws_s3_bucket" "bucket": │ 67: for_each = var.replication_rules │ │ This object does not have an attribute named "replication_rules". ╵ ╷ │ Error: Unsupported attribute │ │ on .terraform/modules/static_website.static_website.access_logs/modules/private-s3-bucket/main.tf line 56, in resource "aws_s3_bucket" "bucket": │ 56: for_each = var.replication_rules │ │ This object does not have an attribute named "replication_rules". ``` By default, this variable is `{}`. Also, I don't even want to have two extra buckets for logging, in order to reduce costs. Is it ok expose a variable for this? Terraform Version: 1.1.5
This is from aws provider v4, which has backward incompatibilities for the s3 resource which our module hasn't been adapted with. This should be resolved if you version lock the aws provider to <4.0 using the suggestion in https://github.com/gruntwork-io/knowledge-base/discussions/187