Skip to content

Commit

Permalink
Disable OpenSearch autotune by default (#21)
Browse files Browse the repository at this point in the history
This feature is only supported by some set of more expensive tiers, so
if someone wants to use a tier that doesn't support auto-tune, they'll
have to include additional configuration to the resource to support that
instead of the other way around.

By not enabling that feature by default, we'll only have it if someone
intentionally wants to use it.
  • Loading branch information
clarissalimab authored Jan 28, 2025
1 parent 22b501f commit ea1eac9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/opensearch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "aws_opensearch_domain" "this" {
for_each = length(var.auto_tune_options) > 0 ? [var.auto_tune_options] : []

content {
desired_state = try(auto_tune_options.value.desired_state, "ENABLED")
desired_state = try(auto_tune_options.value.desired_state, "DISABLED")

dynamic "maintenance_schedule" {
for_each = try(auto_tune_options.value.maintenance_schedule, [])
Expand Down
3 changes: 1 addition & 2 deletions modules/opensearch/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ variable "auto_tune_options" {
description = "Configuration block for the Auto-Tune options of the domain"
type = any
default = {
desired_state = "ENABLED"
rollback_on_disable = "NO_ROLLBACK"
desired_state = "DISABLED"
}
}

Expand Down
2 changes: 1 addition & 1 deletion opensearch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module "opensearch" {
}

auto_tune_options = {
desired_state = "ENABLED"
desired_state = "DISABLED"

maintenance_schedule = [
{
Expand Down

0 comments on commit ea1eac9

Please sign in to comment.