Skip to content

Commit

Permalink
feat(auto-tune): improve cluster speed and stability (#44)
Browse files Browse the repository at this point in the history
* add auto-tune config

* update readme

* fix: remove logging from pull request

---------

Signed-off-by: Mikio Stewart <[email protected]>
Co-authored-by: mstewart7 <[email protected]>
Co-authored-by: Andres Montalban <[email protected]>
Co-authored-by: Steve Teuber <[email protected]>
  • Loading branch information
4 people authored Sep 1, 2023
1 parent 0346090 commit 8e4afdc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Here is a working example of using this Terraform module:
| <a name="input_advanced_security_options_internal_user_database_enabled"></a> [advanced\_security\_options\_internal\_user\_database\_enabled](#input\_advanced\_security\_options\_internal\_user\_database\_enabled) | Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin | `bool` | `false` | no |
| <a name="input_advanced_security_options_master_user_name"></a> [advanced\_security\_options\_master\_user\_name](#input\_advanced\_security\_options\_master\_user\_name) | Master user username (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `null` | no |
| <a name="input_advanced_security_options_master_user_password"></a> [advanced\_security\_options\_master\_user\_password](#input\_advanced\_security\_options\_master\_user\_password) | Master user password (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `null` | no |
| <a name="input_auto_tune_enabled"></a> [auto\_tune\_enabled](#input\_auto\_tune\_enabled) | Whether to enable/disable auto-tune | `bool` | `true` | no |
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | The number of availability zones for the OpenSearch cluster. Valid values: 1, 2 or 3. | `number` | `3` | no |
| <a name="input_cluster_domain"></a> [cluster\_domain](#input\_cluster\_domain) | The hosted zone name of the OpenSearch cluster. | `string` | n/a | yes |
| <a name="input_cluster_domain_private"></a> [cluster\_domain\_private](#input\_cluster\_domain\_private) | Indicates whether to create records in a private (true) or public (false) zone | `bool` | `false` | no |
Expand Down
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ resource "aws_elasticsearch_domain" "opensearch" {
kms_key_id = var.encrypt_kms_key_id
}

auto_tune_options {
desired_state = var.auto_tune_enabled ? "ENABLED" : "DISABLED"
}

dynamic "vpc_options" {
for_each = var.vpc_enabled ? [true] : []
content {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,9 @@ variable "encrypt_at_rest_enabled" {
type = bool
default = true
}

variable "auto_tune_enabled" {
description = "Whether to enable/disable auto-tune"
type = bool
default = true
}

0 comments on commit 8e4afdc

Please sign in to comment.