Skip to content

danisla/terraform-google-elasticsearch

Repository files navigation

Elasticsearch Terraform Module

Terraform module for creating Elasticsearch nodes and various cluster topologies.

Usage

module "es" {
  source       = "git::https://github.com/danisla/terraform-google-elasticsearch.git?ref=v1.0.0"
  name         = "es-single-node"
  region       = "us-central1"
  zones        = ["us-central1-f"]
  machine_type = "n1-standard-1"
  heap_size    = "2g"
  master_node  = true
  data_node    = true
  disk_size_gb = 50
}

Examples

button

Example single node cluster deployment.

architecture diagram

button

Example multi-node cluster deployment

architecture diagram

button

Similar example as the multi-node cluster deployment but with data nodes outside of a instance group manager.

architecture diagram

Module Best Practices

  • Rebuild disk images using the packer repository.
  • Set disk_auto_delete = false in production to avoid losing data when instances are recreated.

Scaling

In the multi-node example each node tier can be scaled independently. When scaling UP, simply, increase the number of nodes using the num_nodes module variable. The new nodes will be created by the Regional Instance Group Manager and the index shards will self-balance.

Upgrading

TBD

Monitoring

TBD

About

Elasticsearch Terraform module for Google Cloud Platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published