fix DNS module internal zone lookup
This commit is contained in:
parent
ee27878212
commit
152c172b55
|
@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- fix DNS module internal zone lookup
|
||||
|
||||
## [1.3.0] - 2020-04-08
|
||||
|
||||
- add organization policy module
|
||||
|
|
|
@ -20,9 +20,11 @@ locals {
|
|||
for record in var.recordsets :
|
||||
join("/", [record.name, record.type]) => record
|
||||
}
|
||||
zone = element(concat(
|
||||
google_dns_managed_zone.non-public, google_dns_managed_zone.public
|
||||
), 0)
|
||||
zone = try(
|
||||
google_dns_managed_zone.non-public.0, try(
|
||||
google_dns_managed_zone.public.0, null
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
resource "google_dns_managed_zone" "non-public" {
|
||||
|
|
|
@ -26,15 +26,15 @@ output "zone" {
|
|||
|
||||
output "name" {
|
||||
description = "The DNS zone name."
|
||||
value = local.zone.name
|
||||
value = try(local.zone.name, null)
|
||||
}
|
||||
|
||||
output "domain" {
|
||||
description = "The DNS zone domain."
|
||||
value = local.zone.dns_name
|
||||
value = try(local.zone.dns_name, null)
|
||||
}
|
||||
|
||||
output "name_servers" {
|
||||
description = "The DNS zone name servers."
|
||||
value = local.zone.name_servers
|
||||
value = try(local.zone.name_servers, null)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue