diff --git a/README.md b/README.md index 4e3d29e..b8a2d9c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This module creates an ElasticSearch cluster. ```HCL module "elasticsearch" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" name = "es-internet-endpoint" ip_whitelist = ["1.2.3.4"] @@ -19,7 +19,7 @@ module "elasticsearch" { ```HCL module "elasticsearch" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" name = "es-vpc-endpoint" vpc_enabled = true @@ -74,6 +74,7 @@ Error creating ElasticSearch domain: ValidationException: Before you can proceed | logging\_search\_slow\_logs | A boolean value to determine if logging is enabled for SEARCH\_SLOW\_LOGS. | `bool` | `false` | no | | master\_node\_count | Number of master nodes in the Elasticsearch cluster. Allowed values are 0, 3 or 5. | `number` | `3` | no | | master\_node\_instance\_type | Select master node instance type. See https://aws.amazon.com/elasticsearch-service/pricing/ for supported instance types. | `string` | `"m5.large.elasticsearch"` | no | +| max\_clause\_count | Note the use of a string rather than an integer. Specifies the maximum number of clauses allowed in a Lucene boolean query. 1024 is the default. Queries with more than the permitted number of clauses that result in a TooManyClauses error. | `string` | `"1024"` | no | | name | The desired name for the Elasticsearch domain. | `string` | n/a | yes | | security\_groups | A list of EC2 security groups to assign to the Elasticsearch cluster. Ignored if Elasticsearch cluster is not VPC enabled. | `list(string)` | `[]` | no | | snapshot\_start\_hour | The hour (0-23) to issue a daily snapshot of Elasticsearch cluster. | `number` | `0` | no | diff --git a/examples/basic_internet_endpoint.tf b/examples/basic_internet_endpoint.tf index 5b5e7a7..aec2385 100644 --- a/examples/basic_internet_endpoint.tf +++ b/examples/basic_internet_endpoint.tf @@ -8,7 +8,7 @@ provider "aws" { } module "es_internet" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" ip_whitelist = ["1.2.3.4"] name = "es-internet-endpoint" diff --git a/examples/basic_vpc_endpoint.tf b/examples/basic_vpc_endpoint.tf index 4ce3f55..a103a17 100644 --- a/examples/basic_vpc_endpoint.tf +++ b/examples/basic_vpc_endpoint.tf @@ -8,7 +8,7 @@ provider "aws" { } module "vpc" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-vpc_basenetwork//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-vpc_basenetwork//?ref=v0.12.2" name = "Test1VPC" } @@ -21,7 +21,7 @@ module "sg" { } module "es_vpc" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" name = "es-vpc-endpoint" security_groups = [module.sg.public_web_security_group_id] diff --git a/examples/full_example.tf b/examples/full_example.tf index 2e0426f..15a69e0 100644 --- a/examples/full_example.tf +++ b/examples/full_example.tf @@ -20,7 +20,7 @@ module "internal_zone" { } module "es_all_options" { - source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" data_node_count = 8 data_node_instance_type = "r4.large.elasticsearch" @@ -42,6 +42,7 @@ module "es_all_options" { logging_search_slow_logs = true master_node_count = 5 master_node_instance_type = "r4.large.elasticsearch" + max_clause_count = "2048" name = "es-custom" security_groups = ["sg-0024aee5bbfbaddbc", "sg-018f1576271f11f3e"] snapshot_start_hour = 21 diff --git a/main.tf b/main.tf index b41a192..a6ef8c2 100644 --- a/main.tf +++ b/main.tf @@ -9,7 +9,7 @@ * * ```HCL * module "elasticsearch" { - * source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + * source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" * * name = "es-internet-endpoint" * ip_whitelist = ["1.2.3.4"] @@ -20,7 +20,7 @@ * * ```HCL * module "elasticsearch" { - * source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1" + * source = "git@github.com:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2" * * name = "es-vpc-endpoint" * vpc_enabled = true @@ -156,7 +156,8 @@ resource "aws_elasticsearch_domain" "es" { tags = merge(var.tags, local.tags) advanced_options = { - "rest.action.multi.allow_explicit_index" = "true" + "rest.action.multi.allow_explicit_index" = "true", + "indices.query.bool.max_clause_count" = var.max_clause_count } cluster_config { diff --git a/variables.tf b/variables.tf index 6363c32..2571ac6 100644 --- a/variables.tf +++ b/variables.tf @@ -124,6 +124,12 @@ variable "master_node_instance_type" { default = "m5.large.elasticsearch" } +variable "max_clause_count" { + description = "Note the use of a string rather than an integer. Specifies the maximum number of clauses allowed in a Lucene boolean query. 1024 is the default. Queries with more than the permitted number of clauses that result in a TooManyClauses error." + type = string + default = "1024" +} + variable "name" { description = "The desired name for the Elasticsearch domain." type = string