https://github.com/cn-terraform/terraform-aws-route53
Route53
https://github.com/cn-terraform/terraform-aws-route53
aws-route53 aws-route53-record aws-route53-zone terraform-module
Last synced: 17 days ago
JSON representation
Route53
- Host: GitHub
- URL: https://github.com/cn-terraform/terraform-aws-route53
- Owner: cn-terraform
- License: apache-2.0
- Created: 2023-09-19T23:21:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-12T14:01:52.000Z (over 1 year ago)
- Last Synced: 2025-02-15T08:30:53.424Z (2 months ago)
- Topics: aws-route53, aws-route53-record, aws-route53-zone, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/cn-terraform/route53
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Route53 Terraform Module for AWS
This Terraform module creates the base networking infrastructure on AWS.
[](https://github.com/cn-terraform/terraform-aws-route53/actions?query=workflow%3Aterraform)
[](https://github.com/cn-terraform/terraform-aws-route53)
[](https://github.com/cn-terraform/terraform-aws-route53)
[](https://github.com/cn-terraform/terraform-aws-route53)
[](https://github.com/cn-terraform/terraform-aws-route53)
[](https://github.com/cn-terraform/terraform-aws-route53)## Usage
Check valid versions on:
* Github Releases:
* Terraform Module Registry:## Install pre commit hooks.
Pleas run this command right after cloning the repository.
pre-commit install
For that you may need to install the folowwing tools:
* [Pre-commit](https://pre-commit.com/)
* [Terraform Docs](https://terraform-docs.io/)In order to run all checks at any point run the following command:
pre-commit run --all-files
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
| [aws](#requirement\_aws) | >= 5 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 5.17.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_route53_record.records](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_route53_zone.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [comment](#input\_comment) | (Optional) A comment for the hosted zone. Defaults to 'Managed by Terraform' | `string` | `null` | no |
| [create\_hosted\_zone](#input\_create\_hosted\_zone) | (Optional) If true a hosted zone will be created | `bool` | `true` | no |
| [delegation\_set\_id](#input\_delegation\_set\_id) | (Optional) The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with vpc as delegation sets can only be used for public zones. | `string` | `null` | no |
| [force\_destroy](#input\_force\_destroy) | (Optional) Whether to destroy all records (possibly managed outside of Terraform) in the zone when destroying the zone. | `bool` | `true` | no |
| [hosted\_zone\_id](#input\_hosted\_zone\_id) | (Optional) Required when create\_hosted\_zone is false. This is the hosted zone where records will be created. | `string` | `null` | no |
| [hosted\_zone\_name](#input\_hosted\_zone\_name) | (Optional) Required when create\_hosted\_zone is true. This is the name of the hosted zone. | `string` | `null` | no |
| [hosted\_zone\_tags](#input\_hosted\_zone\_tags) | (Optional) A map of tags to assign to the zone. If configured with a provider default\_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. | `map(string)` | `{}` | no |
| [records](#input\_records) | (Optional) Map of records to add to the hosted zone |map(object({| `{}` | no |
# (Optional) An alias block. Conflicts with ttl and records.
alias = optional(object({
# (Required) DNS domain name for a CloudFront distribution, S3 bucket, ELB, or another resource record set in this hosted zone.
name = string
# (Required) Hosted zone ID for a CloudFront distribution, S3 bucket, ELB, or Route 53 hosted zone. See resource_elb.zone_id for example.
zone_id = string
# (Required) Set to true if you want Route 53 to determine whether to respond to DNS queries using this resource record set by checking the health of the resource record set. Some resources have special requirements, see related part of documentation.
evaluate_target_health = bool
}))
# (Optional) Allow creation of this record in Terraform to overwrite an existing record, if any. This does not affect the ability to update the record in Terraform and does not prevent other resources within Terraform or manual Route 53 changes outside Terraform from overwriting this record. false by default. This configuration is not recommended for most environments.
allow_overwrite = optional(bool)
# (Optional) The health check the record should be associated with.
health_check_id = optional(string)
# (Required for non-alias records) A string list of records. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add \"\" inside the Terraform configuration string (e.g., "first255characters\"\"morecharacters").
records = optional(list(string))
# (Required for non-alias records) The TTL of the record.
ttl = optional(number)
# (Required) The record type. Valid values are A, AAAA, CAA, CNAME, DS, MX, NAPTR, NS, PTR, SOA, SPF, SRV and TXT.
type = string
}))
| [vpc](#input\_vpc) | (Optional) Configuration block(s) specifying VPC(s) to associate with a private hosted zone. Conflicts with the delegation\_set\_id argument in this resource and any aws\_route53\_zone\_association resource specifying the same zone ID. |object({| `null` | no |
# (Required) ID of the VPC to associate.
vpc_id = string
# (Optional) Region of the VPC to associate. Defaults to AWS provider region.
vpc_region = optional(string)
})## Outputs
| Name | Description |
|------|-------------|
| [arn](#output\_arn) | The Amazon Resource Name (ARN) of the Hosted Zone. |
| [name\_servers](#output\_name\_servers) | A list of name servers in associated (or default) delegation set. Find more about delegation sets in AWS docs. |
| [primary\_name\_server](#output\_primary\_name\_server) | The Route 53 name server that created the SOA record. |
| [records](#output\_records) | ------------------------------------------------------------------------------ Records ------------------------------------------------------------------------------ |
| [tags\_all](#output\_tags\_all) | A map of tags assigned to the resource, including those inherited from the provider default\_tags configuration block. |
| [zone\_id](#output\_zone\_id) | The Hosted Zone ID. This can be referenced by zone records. |