diff --git a/primary.tf b/primary.tf index b4e05add..04f18036 100644 --- a/primary.tf +++ b/primary.tf @@ -1,5 +1,5 @@ resource "google_compute_instance" "primary" { - count = "3" + count = "${var.install_type == "ipm" ? 3 : var.primary_count}" name = "${var.prefix}-primary-${count.index}" machine_type = "${var.primary_machine_type}" zone = "${var.zone}" diff --git a/variables.tf b/variables.tf index 0a35f111..18f6350b 100644 --- a/variables.tf +++ b/variables.tf @@ -167,7 +167,7 @@ variable "image_family" { variable "primary_count" { type = "string" - description = "Currently unused. Must have 3 primary nodes." + description = "Number of primary nodes to run, must be odd number - 3 or 5 recommended." default = "3" }