s3-static-website redirect_rule syntax example isn't doing it for me.
Hi, I'm trying to spin up a static s3 site with some redirect rules and just can't figure out the right syntax. The gruntworks example I'm using is [this one](https://github.com/gruntwork-io/terraform-aws-static-assets/blob/v0.15.3/modules/s3-static-website/variables.tf#L88-L99) in the variables file of the right version of the module I'm using. ```hcl routing_rule = { condition = { key_prefix_equals = "docs/" } redirect = { hostname = "example" http_redirect_code = "403" protocol = "https" replace_key_prefix_with = "documents/" } } ``` However, I'm getting this error ``` ╷ │ Error: Insufficient redirect blocks │ │ on .terraform/modules/static_website.static_website/modules/s3-static-website/main.tf line 78, in resource "aws_s3_bucket_website_configuration" "website": │ 78: content { │ │ At least 1 "redirect" blocks are required. ╵ ╷ │ Error: Insufficient redirect blocks │ │ on .terraform/modules/static_website.static_website/modules/s3-static-website/main.tf line 78, in resource "aws_s3_bucket_website_configuration" "website": │ 78: content { │ │ At least 1 "redirect" blocks are required. ╵ ``` I feel like I'm missing something small, but it's small so I can't find it. Sadly I also can't find a gruntworks example except the one in the commented out hcl. Thanks, Carl --- <ins datetime="2022-06-15T17:11:22Z"> <p><a href="https://support.gruntwork.io/hc/requests/108782">Tracked in ticket #108782</a></p> </ins>
I have a potential fix for this in our module code [here](https://github.com/gruntwork-io/terraform-aws-static-assets/pull/111). We're waiting for tests to pass, and also for a review to make sure we didn't miss something.