Creates a Route 53 hosted zone for a subdomain delegated from another hosted zone. You can use this module to create restricted hosted zones for specific environments, or to allow another account to manage record sets for a specific subdomain.
terraform {
backend "s3" {}
required_providers {
aws = {
version = "~> 3.0"
}
}
}
provider "aws" {
alias = "network"
region = "us-west-2"
}
provider "aws" {
region = "us-west-2"
alias = "staging"
}
module "subdomain" {
source = "[email protected]:thoughtbot/terraform-route-53-delegated-subdomain.git?ref=v0.3.0"
providers = {
aws.root = aws.network
aws.subdomain = aws.staging
}
root_domain_name = "example.com"
subdomain = "staging"
}
Name | Version |
---|---|
terraform | >= 1.0.0 |
aws | ~> 5.0 |
Name | Version |
---|---|
aws.root | ~> 5.0 |
aws.subdomain | ~> 5.0 |
No modules.
Name | Type |
---|---|
aws_route53_record.ns | resource |
aws_route53_zone.subdomain | resource |
aws_route53_zone.root | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
root_domain_name | Domain name (ie example.com) for the root hosted zone | string |
n/a | yes |
subdomain | Subdomain (ie www) for which a hosted zone should be delegated | string |
n/a | yes |
tags | Tags which should be applied to created resources | map(string) |
{} |
no |
ttl | TTL value for NS DNS records | number |
3600 |
no |
Name | Description |
---|---|
name | Full name of the subdomain |
subdomain_zone_id | Zone ID of the subdomain hosted zone |
Please see CONTRIBUTING.md.
This module is Copyright © 2021 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
This repo is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects. We are available for hire.