Used to redirect domain examplea.com to exampleb.com, or test.examplea.com to exampleb.com.
module "redirect" {
source = "Lupus-Metallum/cloudfront-lambda-redirect/aws"
version = "2.5.0"
name = "example-redirect"
source_zone_name = "examplea.com"
source_sub_domain = "test"
redirect_url = "https://exampleb.com"
redirect_http_code = 302
redirect_to_https = true
cloudfront_ipv6 = true
cloudfront_http_version = "http2and3"
}
Name | Version |
---|---|
aws | n/a |
Name | Source | Version |
---|---|---|
acm_this | Lupus-Metallum/acm/aws | 1.0.1 |
Name | Type |
---|---|
aws_cloudfront_distribution.this | resource |
aws_cloudfront_function.this | resource |
aws_cloudfront_origin_access_identity.this | resource |
aws_route53_record.a_this | resource |
aws_route53_record.aaaa_this | resource |
aws_s3_bucket.this | resource |
aws_s3_bucket_acl.this | resource |
aws_s3_bucket_ownership_controls.this | resource |
aws_s3_bucket_policy.this | resource |
aws_s3_bucket_public_access_block.this | resource |
aws_s3_bucket_server_side_encryption_configuration.this | resource |
aws_s3_bucket_website_configuration.this | resource |
aws_caller_identity.current | data source |
aws_iam_policy_document.s3_this | data source |
aws_partition.current | data source |
aws_route53_zone.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | Name to use for resource names created by this module | string |
n/a | yes |
redirect_url | What redirect url should we redirect to? example: 'example.com/123/456' | string |
n/a | yes |
source_zone_name | What is the r53 zone name of the source url? | string |
n/a | yes |
cloudfront_http_version | What version of HTTP should we configure this CloudFront distrobution for? | string |
"http2" |
no |
cloudfront_ipv6 | Should we configure the cloudfront distribution for IPv6? | bool |
true |
no |
description | Description to use for resource description created by this module | string |
"Redirect to new URL" |
no |
memory_size | Memory to use for Lambda, defaults to 128mb | number |
128 |
no |
redirect_http_code | What HTTP Redirect code should we use? | number |
302 |
no |
redirect_to_https | Should redirect URL use HTTPS? | bool |
true |
no |
response_headers_policy_id | Should we add a response headers policy to the CloudFront distrobution created by this module? | string |
"" |
no |
source_sub_domain | What is the subdomain name of the source url? | string |
"" |
no |
tags | Tags to add to resouces created by this module | map(string) |
{} |
no |
timeout | Timeout to use for Lambda, defaults to 1ms | number |
1 |
no |
Name | Description |
---|---|
arn | n/a |