diff --git a/README.md b/README.md index 6bfbe6e..ae38348 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5.7 | -| [aws](#requirement\_aws) | >= 6.0 | +| [aws](#requirement\_aws) | >= 6.15 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 6.0 | +| [aws](#provider\_aws) | >= 6.15 | ## Modules @@ -189,6 +189,7 @@ No modules. | [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 | | [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 | | [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` |
{
"anonymous_auth_enabled": false,
"enabled": true
}
| no | +| [aiml\_options](#input\_aiml\_options) | Configuration block for Natural Language Query Generation and s3 Vectors |
object({
natural_language_query_generation_options = optional(object({
desired_state = optional(string)
}))
s3_vectors_engine = optional(object({
enabled = optional(bool)
}))
})
| `null` | no | | [auto\_tune\_options](#input\_auto\_tune\_options) | Configuration block for the Auto-Tune options of the domain | `any` |
{
"desired_state": "ENABLED",
"rollback_on_disable": "NO_ROLLBACK"
}
| no | | [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 | | [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 | diff --git a/examples/collection/README.md b/examples/collection/README.md index d335429..f8faae5 100644 --- a/examples/collection/README.md +++ b/examples/collection/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5.7 | -| [aws](#requirement\_aws) | >= 6.0 | +| [aws](#requirement\_aws) | >= 6.15 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 6.0 | +| [aws](#provider\_aws) | >= 6.15 | ## Modules diff --git a/examples/collection/versions.tf b/examples/collection/versions.tf index db13b0a..e1ac31c 100644 --- a/examples/collection/versions.tf +++ b/examples/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } } diff --git a/examples/complete/README.md b/examples/complete/README.md index 57ce2ee..f7709ed 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5.7 | -| [aws](#requirement\_aws) | >= 6.0 | +| [aws](#requirement\_aws) | >= 6.15 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 6.0 | +| [aws](#provider\_aws) | >= 6.15 | ## Modules diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 26935e3..b46b254 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -100,7 +100,7 @@ module "opensearch" { enabled = true } - engine_version = "OpenSearch_2.11" + engine_version = "OpenSearch_2.13" log_publishing_options = [ { log_type = "INDEX_SLOW_LOGS" }, diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index db13b0a..e1ac31c 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } } diff --git a/main.tf b/main.tf index b97fa10..963e007 100644 --- a/main.tf +++ b/main.tf @@ -55,6 +55,28 @@ resource "aws_opensearch_domain" "this" { } } + dynamic "aiml_options" { + for_each = var.aiml_options != null ? [var.aiml_options] : [] + content { + + dynamic "natural_language_query_generation_options" { + for_each = aiml_options.value.natural_language_query_generation_options != null ? [aiml_options.value.natural_language_query_generation_options] : [] + + content { + desired_state = natural_language_query_generation_options.value.desired_state + } + } + + dynamic "s3_vectors_engine" { + for_each = aiml_options.value.s3_vectors_engine != null ? [aiml_options.value.s3_vectors_engine] : [] + + content { + enabled = s3_vectors_engine.value.enabled + } + } + } + } + dynamic "auto_tune_options" { for_each = length(var.auto_tune_options) > 0 ? [var.auto_tune_options] : [] diff --git a/modules/collection/README.md b/modules/collection/README.md index e7afc98..77c1379 100644 --- a/modules/collection/README.md +++ b/modules/collection/README.md @@ -42,13 +42,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5.7 | -| [aws](#requirement\_aws) | >= 6.0 | +| [aws](#requirement\_aws) | >= 6.15 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 6.0 | +| [aws](#provider\_aws) | >= 6.15 | ## Modules diff --git a/modules/collection/versions.tf b/modules/collection/versions.tf index db13b0a..e1ac31c 100644 --- a/modules/collection/versions.tf +++ b/modules/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } } diff --git a/variables.tf b/variables.tf index 391eaed..3471c80 100644 --- a/variables.tf +++ b/variables.tf @@ -29,6 +29,19 @@ variable "advanced_security_options" { } } +variable "aiml_options" { + description = "Configuration block for Natural Language Query Generation and s3 Vectors" + type = object({ + natural_language_query_generation_options = optional(object({ + desired_state = optional(string) + })) + s3_vectors_engine = optional(object({ + enabled = optional(bool) + })) + }) + default = null +} + variable "auto_tune_options" { description = "Configuration block for the Auto-Tune options of the domain" type = any diff --git a/versions.tf b/versions.tf index db13b0a..e1ac31c 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } } diff --git a/wrappers/collection/versions.tf b/wrappers/collection/versions.tf index db13b0a..e1ac31c 100644 --- a/wrappers/collection/versions.tf +++ b/wrappers/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } } diff --git a/wrappers/main.tf b/wrappers/main.tf index 63e63f3..0f01f9f 100644 --- a/wrappers/main.tf +++ b/wrappers/main.tf @@ -12,6 +12,7 @@ module "wrapper" { enabled = true anonymous_auth_enabled = false }) + aiml_options = try(each.value.aiml_options, var.defaults.aiml_options, null) auto_tune_options = try(each.value.auto_tune_options, var.defaults.auto_tune_options, { desired_state = "ENABLED" rollback_on_disable = "NO_ROLLBACK" diff --git a/wrappers/versions.tf b/wrappers/versions.tf index db13b0a..e1ac31c 100644 --- a/wrappers/versions.tf +++ b/wrappers/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 6.0" + version = ">= 6.15" } } }