From 626c3e44a2283761ec739059b669865f55a9e61c Mon Sep 17 00:00:00 2001 From: younsl Date: Fri, 25 Oct 2024 08:56:41 +0900 Subject: [PATCH 1/6] chore: Add off_peak_window_options value for exmaple Signed-off-by: younsl --- examples/complete/main.tf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 1cef719..6aaad7b 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -60,9 +60,11 @@ module "opensearch" { cluster_config = { instance_count = 3 + instance_type = "r6g.large.search" + dedicated_master_enabled = true + dedicated_master_count = 3 dedicated_master_type = "c6g.large.search" - instance_type = "r6g.large.search" zone_awareness_config = { availability_zone_count = 3 @@ -150,6 +152,11 @@ module "opensearch" { } ] + # Off-peak window + off_peak_window_options = { + enabled = false + } + tags = local.tags } From b241b46667e795cc6bdb241a862ff63419873601 Mon Sep 17 00:00:00 2001 From: younsl Date: Fri, 25 Oct 2024 09:10:25 +0900 Subject: [PATCH 2/6] chore: Add multi_az_with_standby_enabled value for example * To help users understand, an example setting for the multi_az_with_standby_enabled value is explicitly declared. Signed-off-by: younsl --- examples/complete/main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 6aaad7b..8fb9cc8 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -59,6 +59,8 @@ module "opensearch" { } cluster_config = { + multi_az_with_standby_enabled = false + instance_count = 3 instance_type = "r6g.large.search" From f6f7d02e8fa4d66e086e070e350e428955a70c76 Mon Sep 17 00:00:00 2001 From: younsl Date: Fri, 25 Oct 2024 09:26:15 +0900 Subject: [PATCH 3/6] docs: Add explanatory values and update config examples * Included multi-AZ standby and dedicated master node settings for clarity. * Provided a link to AWS documentation for additional context on off-peak windows. * Sort cluster_config values --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6afbeea..6f0dbb1 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,13 @@ module "opensearch" { } cluster_config = { - instance_count = 3 + multi_az_with_standby_enabled = false + dedicated_master_enabled = true + dedicated_master_count = 3 dedicated_master_type = "c6g.large.search" + + instance_count = 3 instance_type = "r6g.large.search" zone_awareness_config = { @@ -124,6 +128,11 @@ module "opensearch" { } ] + # Off-peak window + off_peak_window_options = { + enabled = false + } + tags = { Terraform = "true" Environment = "dev" @@ -212,7 +221,7 @@ No modules. | [ip\_address\_type](#input\_ip\_address\_type) | The IP address type for the endpoint. Valid values are ipv4 and dualstack | `string` | `null` | no | | [log\_publishing\_options](#input\_log\_publishing\_options) | Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log\_type, within the same resource | `any` |
[
{
"log_type": "INDEX_SLOW_LOGS"
},
{
"log_type": "SEARCH_SLOW_LOGS"
}
]
| no | | [node\_to\_node\_encryption](#input\_node\_to\_node\_encryption) | Configuration block for node-to-node encryption options | `any` |
{
"enabled": true
}
| no | -| [off\_peak\_window\_options](#input\_off\_peak\_window\_options) | Configuration to add Off Peak update options | `any` |
{
"enabled": true,
"off_peak_window": {
"hours": 7
}
}
| no | +| [off\_peak\_window\_options](#input\_off\_peak\_window\_options) | Configuration to add Off Peak update options. OpenSearch Service uses off-peak window to schedule service software updates and Auto-Tune optimizations that require a blue/green deployment during comparatively lower traffic times, whenever possible. Refer to the [AWS documentation](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html) for details. | `any` |
{
"enabled": true,
"off_peak_window": {
"hours": 7
}
}
| no | | [outbound\_connections](#input\_outbound\_connections) | Map of AWS OpenSearch outbound connections to create | `any` | `{}` | no | | [package\_associations](#input\_package\_associations) | Map of package association IDs to associate with the domain | `map(string)` | `{}` | no | | [saml\_options](#input\_saml\_options) | SAML authentication options for an AWS OpenSearch Domain | `any` | `{}` | no | From 30439aec21011be689fb7435b0052f6c78269c76 Mon Sep 17 00:00:00 2001 From: younsl Date: Fri, 25 Oct 2024 09:31:37 +0900 Subject: [PATCH 4/6] docs(opensearch): Clarify engine version examples in input documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f0dbb1..a726d13 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ No modules. | [ebs\_options](#input\_ebs\_options) | Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/) | `any` |
{
"ebs_enabled": true,
"volume_size": 64,
"volume_type": "gp3"
}
| no | | [enable\_access\_policy](#input\_enable\_access\_policy) | Determines whether an access policy will be applied to the domain | `bool` | `true` | no | | [encrypt\_at\_rest](#input\_encrypt\_at\_rest) | Configuration block for encrypting at rest | `any` |
{
"enabled": true
}
| no | -| [engine\_version](#input\_engine\_version) | Version of the OpenSearch engine to use | `string` | `null` | no | +| [engine\_version](#input\_engine\_version) | Version of the OpenSearch engine to use. For example, `OpenSearch_2.11` or `Elasticsearch_7.9`. | `string` | `null` | no | | [ip\_address\_type](#input\_ip\_address\_type) | The IP address type for the endpoint. Valid values are ipv4 and dualstack | `string` | `null` | no | | [log\_publishing\_options](#input\_log\_publishing\_options) | Configuration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log\_type, within the same resource | `any` |
[
{
"log_type": "INDEX_SLOW_LOGS"
},
{
"log_type": "SEARCH_SLOW_LOGS"
}
]
| no | | [node\_to\_node\_encryption](#input\_node\_to\_node\_encryption) | Configuration block for node-to-node encryption options | `any` |
{
"enabled": true
}
| no | From 69b5d98c35c8d8d2ec77e1c584748fdd4e25780f Mon Sep 17 00:00:00 2001 From: younsl Date: Fri, 25 Oct 2024 09:39:40 +0900 Subject: [PATCH 5/6] style: Lint terraform fmt * Using pre-commit run -a before submit PR --- examples/complete/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 8fb9cc8..42e7160 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -61,8 +61,8 @@ module "opensearch" { cluster_config = { multi_az_with_standby_enabled = false - instance_count = 3 - instance_type = "r6g.large.search" + instance_count = 3 + instance_type = "r6g.large.search" dedicated_master_enabled = true dedicated_master_count = 3 From 3cf9c430d81be0d9c5fa590f4c6c2427862468e5 Mon Sep 17 00:00:00 2001 From: Younsung Lee Date: Fri, 25 Oct 2024 09:42:59 +0900 Subject: [PATCH 6/6] style: Lint terraform fmt * Apply linting in example written by markdown. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a726d13..5ec4f0c 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ module "opensearch" { dedicated_master_count = 3 dedicated_master_type = "c6g.large.search" - instance_count = 3 - instance_type = "r6g.large.search" + instance_count = 3 + instance_type = "r6g.large.search" zone_awareness_config = { availability_zone_count = 3