Skip to content

Commit

Permalink
feat(zones): Add primary name server to outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphireqt committed Jun 17, 2024
1 parent e3e3548 commit d14cf1a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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
1 change: 1 addition & 0 deletions modules/zones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d14cf1a

Please sign in to comment.