Complete ElasticSearch example
Configuration in this directory creates an ElasticSearch Domain with advanced/custom configuration in the VPC.
You can choose to create an ElasticSearch Domain with the different options by setting the variables as described below:
- Create an ES domain in an existing VPC in a single availability zone.
create_vpc = false zone_awareness_enabled = false es_subnets_ids = ["subnet-xxxxxxx"] # pass a single subnet-id
- Create an ES domain in an existing VPC in a multiple availability zones.
create_vpc = false zone_awareness_enabled = true es_subnets_ids = ["subnet-xxxxxxx", "subnet-xxxxxx"] # pass minimum two subnet-ids
- Create an ES domain in a new VPC in a single availability zone.
create_vpc = true zone_awareness_enabled = false
- Create an ES domain in an new VPC in a multiple availability zone.
create_vpc = true zone_awareness_enabled = true
Usage
To run this example you need to execute:
$ terraform init
$ terraform plan
$ terraform apply
Note that this example may create resources which cost money. Run terraform destroy
when you don’t need these resources.