From 2638e8dfb811382ad1a6bea1775767be59b2f15e Mon Sep 17 00:00:00 2001 From: Amy Brown Date: Wed, 25 Sep 2019 16:45:36 -0500 Subject: [PATCH 1/2] Primaries and IPM When internal production mode is set, the number of primaries needs to be hard set at 3, due to scaling issues with ceph. Otherwise, the value of the count variable will be used. --- primary.tf | 2 +- variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primary.tf b/primary.tf index 78571120..cf97ed70 100644 --- a/primary.tf +++ b/primary.tf @@ -1,5 +1,5 @@ resource "aws_instance" "primary" { - count = "${var.primary_count}" + count = "${var.install_type == "ipm" ? 3 : var.primary_count}" ami = "${var.ami != "" ? var.ami : local.distro_ami}" instance_type = "${var.primary_instance_type}" diff --git a/variables.tf b/variables.tf index e96dfa7d..f212be23 100644 --- a/variables.tf +++ b/variables.tf @@ -110,7 +110,7 @@ variable "installer_url" { variable "primary_count" { type = "string" - description = "The number of additional cluster master nodes to run" + description = "The number of primary cluster master nodes to run, should be 3 or 5." default = 3 } From e88158fef69351990f3857872dfe34499446d427 Mon Sep 17 00:00:00 2001 From: Amy Brown Date: Fri, 27 Sep 2019 10:06:15 -0500 Subject: [PATCH 2/2] Added comment re primary_count Inserted a comment explaining the count line on the primary instance resource. --- primary.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/primary.tf b/primary.tf index cf97ed70..664ab632 100644 --- a/primary.tf +++ b/primary.tf @@ -1,4 +1,7 @@ resource "aws_instance" "primary" { + /* 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}" ami = "${var.ami != "" ? var.ami : local.distro_ami}" instance_type = "${var.primary_instance_type}"