Skip to content

Commit e8f43f0

Browse files
committed
Control creation of dedicated master node for OpenSearch with variable
And disable it by default.
1 parent 0b15b0a commit e8f43f0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

opensearch-variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ variable "es_instance_count" {
1010
default = 2
1111
}
1212

13+
variable "es_dedicated_master_enabled" {
14+
type = bool
15+
description = "Set to true to enable dedicated master nodes"
16+
default = false
17+
}
18+
1319
variable "es_dedicated_master_type" {
1420
type = string
1521
description = "Instance type of the dedicated main nodes in the cluster."

opensearch.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module "opensearch" {
5454

5555
cluster_config = {
5656
instance_count = var.es_instance_count
57-
dedicated_master_enabled = true
57+
dedicated_master_enabled = var.es_dedicated_master_enabled
5858
dedicated_master_type = var.es_dedicated_master_type
5959
instance_type = coalesce(var.es_instance_type, var.es_dedicated_master_type)
6060

0 commit comments

Comments
 (0)