diff --git a/primary.tf b/primary.tf index 85d1de7b..6b1db87e 100644 --- a/primary.tf +++ b/primary.tf @@ -1,5 +1,8 @@ resource "google_compute_instance" "primary" { - count = "${var.primary_count}" + /* The number of primaries must be hard coded to 3 when Internal Production Mode + is selected. Currently, that mode does not support scaling. In other modes, the + cluster can be scaled according the primary_count variable. */ + 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/secondary.tf b/secondary.tf index 37b397cc..a83ead0a 100644 --- a/secondary.tf +++ b/secondary.tf @@ -16,7 +16,6 @@ resource "google_compute_region_instance_group_manager" "secondary" { base_instance_name = "${var.prefix}-secondary" instance_template = "${module.instance-template.secondary_template}" - update_strategy = "NONE" region = "${var.region}" target_size = "${var.secondary_count}" diff --git a/variables.tf b/variables.tf index 2b34ad92..18f6350b 100644 --- a/variables.tf +++ b/variables.tf @@ -167,8 +167,8 @@ variable "image_family" { variable "primary_count" { type = "string" - description = "Number of primary nodes to run, must be odd number" - default = "1" + description = "Number of primary nodes to run, must be odd number - 3 or 5 recommended." + default = "3" } variable "prefix" {