aws-cloudfront-router
Adaptavist/aws-cloudfront-router/module
module-aws-cloudfront-router A module which creates a CloudFront distribution which is used for routing requests to backend origins based on paths. 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 | no | | default\_cache\_behavior | Default behaviour of the disctrobution when a path has not been matched | object({ origin_id = string domain_name = string allowed_methods = list(string) }) | n/a | yes | | default\_root\_object | Default root object for the CloudFront distribution, this defaults to 'index.html'. | string | "i
| Name | Type | Description | Default |
|---|---|---|---|
| acm_cert_arn | string | AWS ACM certificate ARN to use for the CloudFront distribution. | required |
| stage | string | The stage of the distribution - (dev, staging etc). | required |
| domain | string | Domain name to use for the CloudFront distribution. | required |
| namespace | string | The namespace of the distribution. | required |
| origin_mappings | map(object({ origin_id | Origin mappings, origins are matched based on path | required |
| r53_zone_name | string | Name of the public hosted zone, this is used for creating the A record for the C | required |
| name | string | The name of the distribution. | required |
| tags | map(any) | Tags applied to the distribution, these should follow what is defined [here](htt | required |
| default_cache_behavior | object({ origin_id = | Default behaviour of the disctrobution when a path has not been matched | required |
| viewer_protocol_policy | string | Default viewer_protocol_policy for the CloudFront distribution, this defaults to | "redirect-to-https" |
| aliases | list(string) | Aliases used by the CloudFront distribution. If none are set the supplied domain | [] |
| enable_access_logs | bool | Should accesses to the CloudFront distribution be logged, defaults to false. | false |
| log_cookies | bool | If access logs are enabled, are cookies logged. | false |
| access_logs_bucket | string | If access logs are enabled the bucket the logs should go into, defaults to false | "" |
| default_root_object | string | Default root object for the CloudFront distribution, this defaults to 'index.htm | "index.html" |
| origin_protocol_policy | string | Default origin_protocol_policy for the CloudFront distribution, this defaults to | "https-only" |
| forward_all | bool | When enabled, forwards cookies, query strings and headers to origins | true |
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 ID