Skip to content

Commit

Permalink
DNS refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
apichick committed Jul 19, 2023
1 parent 7cfc135 commit c907fd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ resource "google_dns_record_set" "dns_record_set" {
type = each.value.type
ttl = each.value.ttl
rrdatas = each.value.records

dynamic "routing_policy" {
for_each = (each.value.geo_routing != null || each.value.wrr_routing != null) ? [""] : []
content {
Expand Down
8 changes: 4 additions & 4 deletions modules/dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ variable "zone_config" {
})
validation {
condition = (
(try(var.zone_config.forwarding, null) == null ? 0 : 1) +
(try(var.zone_config.peering, null) == null ? 0 : 1) +
(try(var.zone_config.public, null) == null ? 0 : 1) +
(try(var.zone_config.private, null) == null ? 0 : 1) <= 1
(try(var.zone_config.forwarding, null) == null ? 0 : 1) +
(try(var.zone_config.peering, null) == null ? 0 : 1) +
(try(var.zone_config.public, null) == null ? 0 : 1) +
(try(var.zone_config.private, null) == null ? 0 : 1) <= 1
)
error_message = "Only one type of zone can be configured at a time."
}
Expand Down

0 comments on commit c907fd7

Please sign in to comment.