cn-terraform / terraform-aws-s3-static-website

Terraform Module for AWS to host Static Website on S3
https://registry.terraform.io/modules/cn-terraform/s3-static-website/aws
Apache License 2.0
20 stars 33 forks source link

Added Cloudfront custom error responses #27

Closed bendubuisson closed 2 years ago

bendubuisson commented 2 years ago

CloudFront custom error responses like so:

module "static-website" {
[...]
  cloudfront_custom_error_responses = [
    {
      error_caching_min_ttl = 10
      error_code            = 404
      response_code         = 404
      response_page_path    = "/404.html"
    },
    {
      error_caching_min_ttl = 10
      error_code            = 403
      response_code         = 404
      response_page_path    = "/404.html"
    },
  ]

}