Skip to content

Commit d20dfcc

Browse files
committed
support AIML Options
1 parent 0adb658 commit d20dfcc

File tree

14 files changed

+52
-15
lines changed

14 files changed

+52
-15
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
144144
| Name | Version |
145145
|------|---------|
146146
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
147-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
147+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
148148

149149
## Providers
150150

151151
| Name | Version |
152152
|------|---------|
153-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
153+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
154154

155155
## Modules
156156

@@ -189,6 +189,7 @@ No modules.
189189
| <a name="input_access_policy_statements"></a> [access\_policy\_statements](#input\_access\_policy\_statements) | A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage | `any` | `{}` | no |
190190
| <a name="input_advanced_options"></a> [advanced\_options](#input\_advanced\_options) | Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing Terraform to want to recreate your Elasticsearch domain on every apply | `map(string)` | `{}` | no |
191191
| <a name="input_advanced_security_options"></a> [advanced\_security\_options](#input\_advanced\_security\_options) | Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) | `any` | <pre>{<br/> "anonymous_auth_enabled": false,<br/> "enabled": true<br/>}</pre> | no |
192+
| <a name="input_aiml_options"></a> [aiml\_options](#input\_aiml\_options) | Configuration block for Natural Language Query Generation and s3 Vectors | <pre>object({<br/> natural_language_query_generation_options = optional(object({<br/> desired_state = optional(string)<br/> }))<br/> s3_vectors_engine = optional(object({<br/> enabled = optional(bool)<br/> }))<br/> })</pre> | `null` | no |
192193
| <a name="input_auto_tune_options"></a> [auto\_tune\_options](#input\_auto\_tune\_options) | Configuration block for the Auto-Tune options of the domain | `any` | <pre>{<br/> "desired_state": "ENABLED",<br/> "rollback_on_disable": "NO_ROLLBACK"<br/>}</pre> | no |
193194
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: STANDARD or INFREQUENT\_ACCESS | `string` | `null` | no |
194195
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html) | `string` | `null` | no |

examples/collection/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
3030

3131
## Modules
3232

examples/collection/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.0"
7+
version = ">= 6.15"
88
}
99
}
1010
}

examples/complete/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
|------|---------|
35-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
35+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
3636

3737
## Modules
3838

examples/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module "opensearch" {
100100
enabled = true
101101
}
102102

103-
engine_version = "OpenSearch_2.11"
103+
engine_version = "OpenSearch_2.13"
104104

105105
log_publishing_options = [
106106
{ log_type = "INDEX_SLOW_LOGS" },

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.0"
7+
version = ">= 6.15"
88
}
99
}
1010
}

main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,28 @@ resource "aws_opensearch_domain" "this" {
5555
}
5656
}
5757

58+
dynamic "aiml_options" {
59+
for_each = var.aiml_options != null ? [var.aiml_options] : []
60+
content {
61+
62+
dynamic "natural_language_query_generation_options" {
63+
for_each = aiml_options.value.natural_language_query_generation_options != null ? [aiml_options.value.natural_language_query_generation_options] : []
64+
65+
content {
66+
desired_state = natural_language_query_generation_options.value.desired_state
67+
}
68+
}
69+
70+
dynamic "s3_vectors_engine" {
71+
for_each = aiml_options.value.s3_vectors_engine != null ? [aiml_options.value.s3_vectors_engine] : []
72+
73+
content {
74+
enabled = s3_vectors_engine.value.enabled
75+
}
76+
}
77+
}
78+
}
79+
5880
dynamic "auto_tune_options" {
5981
for_each = length(var.auto_tune_options) > 0 ? [var.auto_tune_options] : []
6082

modules/collection/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
4242
| Name | Version |
4343
|------|---------|
4444
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
45-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |
45+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.15 |
4646

4747
## Providers
4848

4949
| Name | Version |
5050
|------|---------|
51-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |
51+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.15 |
5252

5353
## Modules
5454

modules/collection/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.0"
7+
version = ">= 6.15"
88
}
99
}
1010
}

variables.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ variable "advanced_security_options" {
2929
}
3030
}
3131

32+
variable "aiml_options" {
33+
description = "Configuration block for Natural Language Query Generation and s3 Vectors"
34+
type = object({
35+
natural_language_query_generation_options = optional(object({
36+
desired_state = optional(string)
37+
}))
38+
s3_vectors_engine = optional(object({
39+
enabled = optional(bool)
40+
}))
41+
})
42+
default = null
43+
}
44+
3245
variable "auto_tune_options" {
3346
description = "Configuration block for the Auto-Tune options of the domain"
3447
type = any

0 commit comments

Comments
 (0)