aws-cloudfront-ld-router
Adaptavist/aws-cloudfront-ld-router/module
module-aws-cloudfront-ld-router A module which creates a CloudFront distribution containing an Edge Lambda which is used for routing requests to origins based on the value of a feature flag. The requests are not cached. Variables | Name | Description | Type | Default | Required | |------|-------------|------|---------|:-----:| | acm\_cert\_arn | AWS ACM certificate ARN to use for the CloudFront distribution. | string | n/a | yes | | aliases | Aliases used by the CloudFront distribution. | list(string) | n/a | yes | | default\_cache\_behavior | Default cache behaviour used by the distro, if a backend is static no query strings or cookies are forwarded. | object({ origin_id = string domain_name = string allowed_methods = list(string) static_backend = bool }) | n/a | yes | | default\_root\_ob
| Name | Type | Description | Default |
|---|---|---|---|
| namespace | string | The namespace of the distribution. | required |
| name | string | The name of the distribution. | required |
| new_domain | string | The domain which is used when the feature flag is set to true | required |
| sdk_key | string | The Launch Darkly SDK key | required |
| tags | map(any) | Tags applied to the distribution, these should follow what is defined [here](htt | required |
| legacy_domain | string | Domain which requests are forwarded to when the feature flag is false | required |
| domain | string | Domain name to use for the CloudFront distribution. | required |
| stage | string | The stage of the distribution - (dev, staging etc). | required |
| acm_cert_arn | string | AWS ACM certificate ARN to use for the CloudFront distribution. | required |
| r53_zone_name | string | Name of the public hosted zone, this is used for creating the A record for the C | required |
| origin_mappings | map(object({ origin_id | Custom origin mappings. Can be used in conjunction with S3 origin mappings Defau | required |
| default_cache_behavior | object({ origin_id = | Default cache behaviour used by the distro, if a backend is static no query stri | required |
| feature_flag | string | The Launch Darkly feature flag which is used to determine which domain is routed | required |
| origin_protocol_policy | string | Default origin_protocol_policy for the CloudFront distribution, this defaults to | "https-only" |
| aliases | list(string) | Aliases used by the CloudFront distribution. | [] |
| viewer_protocol_policy | string | Default viewer_protocol_policy for the CloudFront distribution, this defaults to | "redirect-to-https" |
| default_root_object | string | Default root object for the CloudFront distribution, this defaults to 'index.htm | "index.html" |
cf_id — ID of AWS CloudFront distributioncf_arn — ARN of AWS CloudFront distributioncf_status — Current status of the distributioncf_domain_name — Domain name corresponding to the distributioncf_etag — Current version of the distribution's informationcf_hosted_zone_id — CloudFront Route 53 zone IDlambda_role_name — IAM role name given to Edge Lambda