cloudposse / terraform-aws-cloudfront-cdn

Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
https://cloudposse.com/accelerate
Apache License 2.0
99 stars 121 forks source link

CloudFront Origin Group #79

Open air3ijai opened 2 years ago

air3ijai commented 2 years ago

Describe the Feature

CloudFront has a future to create Origin Group which is very usefully for high availability configuration.

Expected Behavior

A way to configure Origin Group, like

  origin_groups = {
    primary_origin_id  = null # will get translated to the origin id of the origin created by this module.
    failover_origin_id = module.s3_bucket.bucket_id
    failover_criteria  = [
      403,
      404,
      500,
      502
    ]
  }

Use Case

Optimizing high availability with CloudFront origin failover

Describe Ideal Solution

Such an option is already supported in the module cloudposse/cloudfront-s3-cdn/aws. Something similar will be a good option.

Thank you!