Skip to content

Tesorio/terraform-aws-module-url-redirect

 
 

Repository files navigation

Terraform AWS URL Redirect

This module implements a HTTP and HTTPS redirect from a domain to a target URL. Configuration is as simple as possible.

It creates a SSL certificate, Route53, Cloudfront and S3 resources.

Usage

Below an example how to use this module ...

module "redirect_technative_nl" {
  source = "wearetechnative/module-url-redirect/aws"

  route53_zone_name   = "technative.nl."
  domain              = "technative.nl"
  redirect_target_url = "https://technative.eu"

  providers = {
    aws.us-east-1: aws.us-east-1
  }
}

Providers

Name Version
aws >= 4.9.0, < 5.0.0
random >=2.3.0, < 3.5.0

Modules

Name Source Version
acm terraform-aws-modules/acm/aws 4.3.1
cloudfront terraform-aws-modules/cloudfront/aws 3.1.0
route53_http_redirect_target_url TechNative-B-V/url-parser/null 0.1.1
website_bucket terraform-aws-modules/s3-bucket/aws 3.6.0

Resources

Name Type
aws_route53_record.website-domain resource
random_pet.this resource
aws_route53_zone.this data source

Inputs

Name Description Type Default Required
domain The primary domain name to use for the website string n/a yes
redirect_target_url Redirect target - should be a full URL. If http:// or https:// is excluded, the scheme of the request will be used string n/a yes
route53_zone_name The name of the hosted zone in Route53 where the SSL certificates will be created string n/a yes

Outputs

No outputs.

Packages

No packages published

Languages

  • HCL 100.0%