Skip to content

Commit

Permalink
Merge pull request #9 from hashicorp/primary-nodes
Browse files Browse the repository at this point in the history
Primary nodes
  • Loading branch information
amy-hashi authored Sep 30, 2019
2 parents 6414a02 + ead36b5 commit 5cad4f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion primary.tf
Original file line number Diff line number Diff line change
@@ -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}"
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 = "Number of primary nodes to run, must be odd number - 3 or 5 recommended."
default = "3"
}

variable "prefix" {
Expand Down

0 comments on commit 5cad4f4

Please sign in to comment.