aws-cloudfront-ld-router

Adaptavist/aws-cloudfront-ld-router/module

Terraform Module HCL MODULE
Install
module "aws-cloudfront-ld-router" {
source = "Adaptavist/aws-cloudfront-ld-router/module"
version = "1.1.0"
}
plain text: /constructs/tfmod-adaptavist-aws-cloudfront-ld-router-module/install.txt
⭐ Source on GitHub 📦 Registry page
README

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

Inputs (17)
NameTypeDescriptionDefault
namespacestringThe namespace of the distribution. required
namestringThe name of the distribution. required
new_domainstringThe domain which is used when the feature flag is set to true required
sdk_keystringThe Launch Darkly SDK key required
tagsmap(any)Tags applied to the distribution, these should follow what is defined [here](htt required
legacy_domainstringDomain which requests are forwarded to when the feature flag is false required
domainstringDomain name to use for the CloudFront distribution. required
stagestringThe stage of the distribution - (dev, staging etc). required
acm_cert_arnstringAWS ACM certificate ARN to use for the CloudFront distribution. required
r53_zone_namestringName of the public hosted zone, this is used for creating the A record for the C required
origin_mappingsmap(object({ origin_id Custom origin mappings. Can be used in conjunction with S3 origin mappings Defau required
default_cache_behaviorobject({ origin_id =Default cache behaviour used by the distro, if a backend is static no query stri required
feature_flagstringThe Launch Darkly feature flag which is used to determine which domain is routed required
origin_protocol_policystringDefault origin_protocol_policy for the CloudFront distribution, this defaults to"https-only"
aliaseslist(string)Aliases used by the CloudFront distribution.[]
viewer_protocol_policystringDefault viewer_protocol_policy for the CloudFront distribution, this defaults to"redirect-to-https"
default_root_objectstringDefault root object for the CloudFront distribution, this defaults to 'index.htm"index.html"
Outputs (7)
cf_id — ID of AWS CloudFront distribution
cf_arn — ARN of AWS CloudFront distribution
cf_status — Current status of the distribution
cf_domain_name — Domain name corresponding to the distribution
cf_etag — Current version of the distribution's information
cf_hosted_zone_id — CloudFront Route 53 zone ID
lambda_role_name — IAM role name given to Edge Lambda
Resources (3)
aws_iam_role_policyaws_ssm_parameterrandom_string
Details
FrameworkTerraform Module
LanguageHCL
Version1.1.0
Cloud MODULE
★ Stars0
Forks2
Total downloads799
Inputs17
Outputs7
Resources3
LicenseApache-2.0
NamespaceAdaptavist
Updated