Skip to content

feat!: Add primary name server to outputs in modules/zones. Bump AWS provider version to 4 #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ module "records" {
# zone_id = local.zone_id

records = [
{
name = ""
type = "SOA"
ttl = 900
records = [
"${module.zones.primary_name_server[local.zone_name]}. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 60",
]
},
{
name = ""
type = "A"
Expand Down
5 changes: 3 additions & 2 deletions modules/zones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This module creates Route53 zones.
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.49 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.36.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.49 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.36.0 |

## Modules

Expand All @@ -38,6 +38,7 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_primary_name_server"></a> [primary\_name\_server](#output\_primary\_name\_server) | The Route 53 name server that created the SOA record. |
| <a name="output_route53_static_zone_name"></a> [route53\_static\_zone\_name](#output\_route53\_static\_zone\_name) | Name of Route53 zone created statically to avoid invalid count argument error when creating records and zones simmultaneously |
| <a name="output_route53_zone_name"></a> [route53\_zone\_name](#output\_route53\_zone\_name) | Name of Route53 zone |
| <a name="output_route53_zone_name_servers"></a> [route53\_zone\_name\_servers](#output\_route53\_zone\_name\_servers) | Name servers of Route53 zone |
Expand Down
5 changes: 5 additions & 0 deletions modules/zones/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ output "route53_zone_name_servers" {
value = { for k, v in aws_route53_zone.this : k => v.name_servers }
}

output "primary_name_server" {
description = "The Route 53 name server that created the SOA record."
value = { for k, v in aws_route53_zone.this : k => v.primary_name_server }
}

output "route53_zone_name" {
description = "Name of Route53 zone"
value = { for k, v in aws_route53_zone.this : k => v.name }
Expand Down
2 changes: 1 addition & 1 deletion modules/zones/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.49"
version = ">= 4.36.0"
}
}
}