Skip to content

Commit

Permalink
Merge pull request #19 from rackspace-infrastructure-automation/advan…
Browse files Browse the repository at this point in the history
…ced_options

Advanced options
  • Loading branch information
bohn002 authored May 28, 2020
2 parents 2f3de06 + 028d3b6 commit 1ca0382
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This module creates an ElasticSearch cluster.

```HCL
module "elasticsearch" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"
name = "es-internet-endpoint"
ip_whitelist = ["1.2.3.4"]
Expand All @@ -19,7 +19,7 @@ module "elasticsearch" {

```HCL
module "elasticsearch" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"
name = "es-vpc-endpoint"
vpc_enabled = true
Expand Down Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_internet_endpoint.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provider "aws" {
}

module "es_internet" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"

ip_whitelist = ["1.2.3.4"]
name = "es-internet-endpoint"
Expand Down
4 changes: 2 additions & 2 deletions examples/basic_vpc_endpoint.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provider "aws" {
}

module "vpc" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-vpc_basenetwork//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-vpc_basenetwork//?ref=v0.12.2"

name = "Test1VPC"
}
Expand All @@ -21,7 +21,7 @@ module "sg" {
}

module "es_vpc" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"

name = "es-vpc-endpoint"
security_groups = [module.sg.public_web_security_group_id]
Expand Down
3 changes: 2 additions & 1 deletion examples/full_example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "internal_zone" {
}

module "es_all_options" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"

data_node_count = 8
data_node_instance_type = "r4.large.elasticsearch"
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* ```HCL
* module "elasticsearch" {
* source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
* source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"
*
* name = "es-internet-endpoint"
* ip_whitelist = ["1.2.3.4"]
Expand All @@ -20,7 +20,7 @@
*
* ```HCL
* module "elasticsearch" {
* source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.1"
* source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-elasticsearch//?ref=v0.12.2"
*
* name = "es-vpc-endpoint"
* vpc_enabled = true
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ca0382

Please sign in to comment.