Skip to content

Commit af7f20c

Browse files
feat: Remove condition from data.google_compute_zones.available (#684)
Co-authored-by: Imran Nayer <[email protected]>
1 parent dee4d74 commit af7f20c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/postgresql/read_replica.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ locals {
1919
for x in var.read_replicas : "${var.name}-replica${var.read_replica_name_suffix}${x.name}" => x
2020
}
2121
// Zone for replica instances
22-
zone = var.zone == null ? data.google_compute_zones.available[0].names[0] : var.zone
22+
zone = var.zone == null ? data.google_compute_zones.available.names[0] : var.zone
2323
}
2424

2525
data "google_compute_zones" "available" {
26-
count = var.zone == null ? 1 : 0
2726
project = var.project_id
2827
region = var.region
2928
}

0 commit comments

Comments
 (0)