Skip to content

Commit

Permalink
Control creation of dedicated master node for OpenSearch with variable
Browse files Browse the repository at this point in the history
And disable it by default.
  • Loading branch information
clarissalimab committed Feb 10, 2025
1 parent 0b15b0a commit e8f43f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions opensearch-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ variable "es_instance_count" {
default = 2
}

variable "es_dedicated_master_enabled" {
type = bool
description = "Set to true to enable dedicated master nodes"
default = false
}

variable "es_dedicated_master_type" {
type = string
description = "Instance type of the dedicated main nodes in the cluster."
Expand Down
2 changes: 1 addition & 1 deletion opensearch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module "opensearch" {

cluster_config = {
instance_count = var.es_instance_count
dedicated_master_enabled = true
dedicated_master_enabled = var.es_dedicated_master_enabled
dedicated_master_type = var.es_dedicated_master_type
instance_type = coalesce(var.es_instance_type, var.es_dedicated_master_type)

Expand Down

0 comments on commit e8f43f0

Please sign in to comment.