https://github.com/wearetechnative/terraform-aws-module-url-redirect
This module implements a HTTP and HTTPS redirect from a domain to a target URL
https://github.com/wearetechnative/terraform-aws-module-url-redirect
acm aws-certificate-manager cloudfront route53 s3 ssl-certificate
Last synced: 4 months ago
JSON representation
This module implements a HTTP and HTTPS redirect from a domain to a target URL
- Host: GitHub
- URL: https://github.com/wearetechnative/terraform-aws-module-url-redirect
- Owner: wearetechnative
- License: apache-2.0
- Created: 2023-05-17T21:20:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-14T13:24:05.000Z (over 1 year ago)
- Last Synced: 2025-03-26T10:48:36.462Z (about 1 year ago)
- Topics: acm, aws-certificate-manager, cloudfront, route53, s3, ssl-certificate
- Language: HCL
- Homepage: https://registry.terraform.io/modules/wearetechnative/module-url-redirect/aws/latest
- Size: 155 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
[](https://technative.eu)
## Usage
Below an example how to use this module ...
```hcl
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](#provider\_aws) | >= 4.9.0, < 5.0.0 |
| [random](#provider\_random) | >=2.3.0, < 3.5.0 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| [acm](#module\_acm) | terraform-aws-modules/acm/aws | 4.3.1 |
| [cloudfront](#module\_cloudfront) | terraform-aws-modules/cloudfront/aws | 3.1.0 |
| [route53\_http\_redirect\_target\_url](#module\_route53\_http\_redirect\_target\_url) | TechNative-B-V/url-parser/null | 0.1.1 |
| [website\_bucket](#module\_website\_bucket) | terraform-aws-modules/s3-bucket/aws | 3.6.0 |
## Resources
| Name | Type |
|------|------|
| [aws_route53_record.website-domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [domain](#input\_domain) | The primary domain name to use for the website | `string` | n/a | yes |
| [redirect\_target\_url](#input\_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](#input\_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.