https://github.com/launchbynttdata/tf-aws-module_primitive-route53_zone
https://github.com/launchbynttdata/tf-aws-module_primitive-route53_zone
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/launchbynttdata/tf-aws-module_primitive-route53_zone
- Owner: launchbynttdata
- License: apache-2.0
- Created: 2026-02-24T14:30:35.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-04-07T18:45:48.000Z (2 months ago)
- Last Synced: 2026-04-07T19:25:46.303Z (2 months ago)
- Language: Go
- Size: 115 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
- Notice: NOTICE
Awesome Lists containing this project
README
# AWS Route53 Zone Primitive Module
[](https://opensource.org/licenses/Apache-2.0)
[](https://creativecommons.org/licenses/by-nc-nd/4.0/)
## Overview
This Terraform module creates an AWS Route53 hosted zone. It wraps the `aws_route53_zone` resource and supports both public and private hosted zones.
## Usage
```hcl
module "zone" {
source = "terraform.registry.launch.nttdata.com/module_primitive/route53_zone/aws"
version = "~> 1.0"
name = "example.com"
tags = var.tags
}
```
See the [complete example](examples/complete/) for a full working example with resource naming.
## Prerequisites
- [asdf](https://github.com/asdf-vm/asdf) or [mise](https://mise.jdx.dev/) for tool version management
- [make](https://www.gnu.org/software/make/)
- [repo](https://android.googlesource.com/tools/repo) for pulling components
### Repo Init
```shell
make configure
```
### Local Testing
1. Set AWS credentials (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION` or use a profile).
2. For the example, ensure `base_domain` in `examples/complete/test.tfvars` is a domain you own.
3. Run:
```shell
make check
```
## Pre-Commit Hooks
The [.pre-commit-config.yaml](.pre-commit-config.yaml) defines hooks for Terraform, Go, and linting. The `commitlint` hook enforces conventional commit messages.
The `detect-secrets-hook` prevents new secrets from being introduced. See [pre-commit hooks documentation](https://pre-commit.com/) for details.
To install the commit message hook:
```shell
pre-commit install --hook-type commit-msg
```
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | ~> 1.10 |
| [aws](#requirement\_aws) | >= 5.0, < 7.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 6.39.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [name](#input\_name) | The name of the hosted zone (domain name). | `string` | n/a | yes |
| [comment](#input\_comment) | A comment for the hosted zone. Defaults to 'Managed by Terraform' when null. | `string` | `null` | no |
| [tags](#input\_tags) | Map of tags to assign to the hosted zone. | `map(string)` | `{}` | no |
| [vpc\_id](#input\_vpc\_id) | The VPC to associate with a private hosted zone. Specifying this creates a private hosted zone. Conflicts with delegation\_set\_id. | `string` | `null` | no |
| [vpc\_region](#input\_vpc\_region) | The VPC's region. Defaults to the region of the AWS provider. | `string` | `null` | no |
| [delegation\_set\_id](#input\_delegation\_set\_id) | The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with vpc\_id as delegation sets can only be used for public zones. | `string` | `null` | no |
| [force\_destroy](#input\_force\_destroy) | Whether to destroy all records (possibly managed outside of Terraform) in the zone when destroying the zone. | `bool` | `false` | no |
## Outputs
| Name | Description |
|------|-------------|
| [id](#output\_id) | The ID of the resource (same as the zone\_id). |
| [zone\_id](#output\_zone\_id) | The Hosted Zone ID. This can be referenced by zone records. |
| [name\_servers](#output\_name\_servers) | A list of name servers in the associated (or default) delegation set. |
| [arn](#output\_arn) | The ARN of the hosted zone. |
| [name](#output\_name) | The name of the hosted zone. |
| [primary\_name\_server](#output\_primary\_name\_server) | The Route 53 name server that created the SOA record. |
| [tags\_all](#output\_tags\_all) | A map of tags assigned to the resource, including those inherited from the provider default\_tags configuration block. |
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | ~> 1.5 |
| [aws](#requirement\_aws) | ~> 5.14 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 5.100.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_route53_zone.zone](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [comment](#input\_comment) | A comment for the hosted zone. Defaults to 'Managed by Terraform' when null. | `string` | `null` | no |
| [delegation\_set\_id](#input\_delegation\_set\_id) | The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with vpc\_id as delegation sets can only be used for public zones. | `string` | `null` | no |
| [force\_destroy](#input\_force\_destroy) | Whether to destroy all records (possibly managed outside of Terraform) in the zone when destroying the zone. | `bool` | `false` | no |
| [name](#input\_name) | The name of the hosted zone (domain name). | `string` | n/a | yes |
| [tags](#input\_tags) | Map of tags to assign to the hosted zone. | `map(string)` | `{}` | no |
| [vpc\_id](#input\_vpc\_id) | The VPC to associate with a private hosted zone. Specifying this creates a private hosted zone. Conflicts with delegation\_set\_id. | `string` | `null` | no |
| [vpc\_region](#input\_vpc\_region) | The VPC's region. Defaults to the region of the AWS provider. | `string` | `null` | no |
## Outputs
| Name | Description |
|------|-------------|
| [arn](#output\_arn) | The ARN of the hosted zone. |
| [id](#output\_id) | The ID of the resource (same as the zone\_id). |
| [name](#output\_name) | The name of the hosted zone. |
| [name\_servers](#output\_name\_servers) | A list of name servers in the associated (or default) delegation set. |
| [zone\_id](#output\_zone\_id) | The Hosted Zone ID. This can be referenced by zone records. |