Manages a Route53 zone and optionally name servers for the zone in a parent or apex zone.
Create a Route 53 Zone in the Authenticated AWS Account
Terragrunt
terraform {
source = "git::https://github.com/developertown/terraform-aws-route53.git?ref=vVERSION"
}
inputs = {
region = "us-east-1"
dns_name = "somedomain.com"
}
Terraform
module "apex_zone" {
source = "github.com/developertown/terraform-aws-route53.git"
version = "VERSION"
region = "us-east-1"
dns_name = "somedomain.com"
}
Create a Route 53 Zone in the Authenticated AWS Account. Add Nameserver (NS) Records to Zone ZXXXXXXXXXXXXXXXXXXXX
which is also managed by the Authenticated AWS Account
Terragrunt
terraform {
source = "git::https://github.com/developertown/terraform-aws-route53.git?ref=vVERSION"
}
inputs = {
region = "us-east-1"
dns_name = "subdomain.somedomain.com"
parent_dns_zone_id = "ZXXXXXXXXXXXXXXXXXXXX"
}
Terraform
module "apex_zone" {
source = "github.com/developertown/terraform-aws-route53.git"
version = "VERSION"
region = "us-east-1"
dns_name = "subdomain.somedomain.com"
parent_dns_zone_id = "ZXXXXXXXXXXXXXXXXXXXX"
}
Create a Route 53 Zone by Assuming Role into another AWS Account
Terragrunt
terraform {
source = "git::https://github.com/developertown/terraform-aws-route53.git?ref=vVERSION"
}
inputs = {
region = "us-east-1"
role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeRole"
dns_name = "somedomain.com"
}
Terraform
module "apex_zone" {
source = "github.com/developertown/terraform-aws-route53.git"
version = "VERSION"
region = "us-east-1"
role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeRole"
dns_name = "somedomain.com"
}
Create a Route 53 Zone by Assuming Role into another AWS Account. Add Nameserver (NS) Records to Zone ZXXXXXXXXXXXXXXXXXXXX
which is managed by the Authenticated AWS Account. Use parent_role_arn
if the parent_dns_zone_id
requires an assumed role to be accessible.
Terragrunt
terraform {
source = "git::https://github.com/developertown/terraform-aws-route53.git?ref=vVERSION"
}
inputs = {
region = "us-east-1"
role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeRole"
dns_name = "subdomain.somedomain.com"
parent_dns_zone_id = "ZXXXXXXXXXXXXXXXXXXXX"
#parent_role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeOtherRole"
}
Terraform
module "apex_zone" {
source = "github.com/developertown/terraform-aws-route53.git"
version = "VERSION"
region = "us-east-1"
role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeRole"
dns_name = "subdomain.somedomain.com"
parent_dns_zone_id = "ZXXXXXXXXXXXXXXXXXXXX"
#parent_role_arn = "arn:aws:iam::XXXXXXXXXXXX:role/SomeOtherRole"
}
Name | Version |
---|---|
hashicorp/aws |
~> 4.36.1 |
Input | Description | Default | Required |
---|---|---|---|
region | AWS Region to create resources in | N/A | Yes |
tags | A set of key/value label pairs to assign to this to the resources | {} |
No |
role_arn | The AWS assume role | "" |
No |
dns_name | The DNS zone to create | N/A | Yes |
dns_ttl | The TTL for Route53 NS Records | 60 |
No |
parent_dns_zone_id | The Route53 Zone to create an NS Record | "" |
No |
parent_role_arn | The AWS assume role | "" |
No |
Output | Description |
---|---|
domain_name | The domain name created in the dns zone |
name_servers | The name servers for the dns zone |
zone_id | The Route53 Zone ID |