Skip to content

Commit

Permalink
Hard code the number of primaries
Browse files Browse the repository at this point in the history
Due to some issues around scaling in internal production mode, the number of primaries should be locked down to 3. Scaling of the cluster beyond that should happen via secondaries.
  • Loading branch information
amy-hashi committed Sep 25, 2019
1 parent 82e060c commit 93300cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion primary.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "google_compute_instance" "primary" {
count = "${var.primary_count}"
count = "3"
name = "${var.prefix}-primary-${count.index}"
machine_type = "${var.primary_machine_type}"
zone = "${var.zone}"
Expand Down
1 change: 0 additions & 1 deletion secondary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "Currently unused. Must have 3 primary nodes."
default = "3"
}

variable "prefix" {
Expand Down

0 comments on commit 93300cc

Please sign in to comment.