From 8409f72ba7ffaeb23e07f795eff969d8775fb3d4 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Fri, 3 Nov 2023 13:22:25 +0100 Subject: [PATCH] fix: Fix zone auto-detection when var.zones are not set (#534) Co-authored-by: Imran Nayer --- modules/mysql/read_replica.tf | 2 +- modules/postgresql/read_replica.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mysql/read_replica.tf b/modules/mysql/read_replica.tf index d0885cd2..2732471c 100644 --- a/modules/mysql/read_replica.tf +++ b/modules/mysql/read_replica.tf @@ -23,7 +23,7 @@ locals { } data "google_compute_zones" "available" { - count = var.zone == null ? 0 : 1 + count = var.zone == null ? 1 : 0 project = var.project_id region = var.region } diff --git a/modules/postgresql/read_replica.tf b/modules/postgresql/read_replica.tf index 653c8569..03432672 100644 --- a/modules/postgresql/read_replica.tf +++ b/modules/postgresql/read_replica.tf @@ -23,7 +23,7 @@ locals { } data "google_compute_zones" "available" { - count = var.zone == null ? 0 : 1 + count = var.zone == null ? 1 : 0 project = var.project_id region = var.region }