This repo contains several modules for creating and managing Amazon Elasticsearch Cluster.
The main module of this repo is
- elasticsearch-cluster: Creates an Elasticsearch cluster. This cluster is managed by AWS and automatically detects and replaces failed nodes.
This repo contain several supporting modules that add extra functionality on top of the elasticsearch-cluster
module:
- elasticsearch-cluster-backup-restore: Creates two lambda functions; a scheduled lambda function that calls the Elasticsearch API to perform snapshotting and backup related tasks, and a second lambda function that calls the Elasticsearch API to perform restore related tasks.
To use a module in your terraform templates, create a module
resource and sets its source
field to the git url of this repo. You should also set the ref
parameter so you are fixed to a specific version of this repo, for example to use v1.1.0
of the elasticsearch-cluster
module, you should add the following:
module "elasticsearch_cluster" {
source = "git::[email protected]:crowdanalyzer/terraform-aws-elasticsearch-service//modules/elasticsearch-cluster?ref=v1.1.0"
# set the parameters for the elasticsearch-cluster module
}
Note: the double slash //
is intentional and required. It is part of terraform's git syntax. See the module documentation and variables.tf
file for all the parameters you can set. Run terraform init
to pull the latest version of this module from this repo before running the standard terraform apply
command.