Skip to content

Commit

Permalink
slight adjustment
Browse files Browse the repository at this point in the history
Since internal production mode is the only mode with a scaling issue, force primary count to 3 only when mode is set to that, otherwise accept the variable value.
  • Loading branch information
amy-hashi committed Sep 25, 2019
1 parent 93300cc commit 52d5bd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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 = "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}"
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit 52d5bd9

Please sign in to comment.