All Projects → terraform-community-modules → Tf_aws_elasticsearch

terraform-community-modules / Tf_aws_elasticsearch

Licence: mit
Terraform module which creates AWS Elasticsearch resources

Projects that are alternatives of or similar to Tf aws elasticsearch

Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-13.7%)
Mutual labels:  aws, terraform, hcl, elasticsearch
Terraform Aws Elasticsearch
Terraform module to provision an Elasticsearch cluster with built-in integrations with Kibana and Logstash.
Stars: ✭ 137 (+87.67%)
Mutual labels:  aws, terraform, hcl, elasticsearch
Elasticsearch Cloud Deploy
Deploy Elasticsearch on the cloud easily
Stars: ✭ 308 (+321.92%)
Mutual labels:  aws, terraform, hcl, elasticsearch
Terraform Aws Couchbase
Reusable infrastructure modules for running Couchbase on AWS
Stars: ✭ 73 (+0%)
Mutual labels:  aws, terraform, hcl
Tf Jitsi
5-minute self-hosted Jitsi on AWS
Stars: ✭ 73 (+0%)
Mutual labels:  aws, terraform, hcl
Curso Aws Com Terraform
🎦 🇧🇷 Arquivos do curso "DevOps: AWS com Terraform Automatizando sua infraestrutura" publicado na Udemy. Você pode me ajudar comprando o curso utilizando o link abaixo.
Stars: ✭ 62 (-15.07%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Github Ci
[DEPRECATED] Serverless CI for GitHub using AWS CodeBuild with PR and status support
Stars: ✭ 49 (-32.88%)
Mutual labels:  aws, terraform, hcl
Terraform Aws S3 Log Storage
This module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrail
Stars: ✭ 65 (-10.96%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Rds Cloudwatch Sns Alarms
Terraform module that configures important RDS alerts using CloudWatch and sends them to an SNS topic
Stars: ✭ 56 (-23.29%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Elasticache Redis
Terraform module to provision an ElastiCache Redis Cluster
Stars: ✭ 73 (+0%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Airflow
Terraform module to deploy an Apache Airflow cluster on AWS, backed by RDS PostgreSQL for metadata, S3 for logs and SQS as message broker with CeleryExecutor
Stars: ✭ 69 (-5.48%)
Mutual labels:  aws, terraform, hcl
Elastic Beanstalk Terraform Setup
🎬 Playbook for setting up & deploying AWS Beanstalk Applications on Docker with 1 command
Stars: ✭ 69 (-5.48%)
Mutual labels:  aws, terraform, hcl
Gitops Terraform Jenkins
GitOps Workflow with Jenkins and Terraform
Stars: ✭ 73 (+0%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-27.4%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Wireguard
Terraform module to deploy WireGuard on AWS
Stars: ✭ 72 (-1.37%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Vpc Peering Multi Account
Terraform module to provision a VPC peering across multiple VPCs in different accounts by using multiple providers
Stars: ✭ 52 (-28.77%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Asg
Terraform AWS Auto Scaling Stack
Stars: ✭ 58 (-20.55%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Vpc Peering
Terraform module to create a peering connection between two VPCs in the same AWS account.
Stars: ✭ 70 (-4.11%)
Mutual labels:  aws, terraform, hcl
Infra Personal
Terraform for setting up my personal infrastructure
Stars: ✭ 45 (-38.36%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Dynamodb
Terraform module that implements AWS DynamoDB with support for AutoScaling
Stars: ✭ 49 (-32.88%)
Mutual labels:  aws, terraform, hcl

tf_aws_elasticsearch

Terraform module for deploying and managing Amazon Elasticsearch Service.

This module has two options for creating an Elasticsearch domain:

  1. Create an Elasticsearch domain with a public endpoint. Access policy is then based on the intersection of the following two criteria

    • source IP address
    • client IAM role

    See this Stack Overflow post for further discussion of access policies for Elasticsearch.

  2. Create an Elasticsearch domain and join it to a VPC. Access policy is then based on the intersection of the following two criteria:

    • security groups applied to Elasticsearch domain
    • client IAM role

If vpc_options option is set, Elasticsearch domain is created within a VPC. If not, Elasticsearch domain is created with a public endpoint

NOTE: You can either launch your domain within a VPC or use a public endpoint, but you can't do both. Considering this, adding or removing vpc_options will force DESTRUCTION of the old Elasticsearch domain and CREATION of a new one. More INFO - VPC support

Several options affect the resilience and scalability of your Elasticsearch domain. For a production deployment:

  • set instance_count to an even number (default: 6) greater than or equal to the dedicated_master_threshold (default: 10)
  • choose an instance_type that is not in the T2 family
  • set es_zone_awareness to true.

This will result in a cluster with three dedicated master nodes, balanced across two availability zones.

For a production deployment it may also make sense to use EBS volumes rather that instance storage; to do so, set ebs_volume_size greater than 0 and optionally specify a value for ebs_volume_type (right now the only supported values are gp2 and magnetic).

Terraform versions

Terraform 0.12. Pin module version to ~> v1.0. Submit pull-requests to master branch.

Terraform 0.11. Pin module version to ~> v0.0. Submit pull-requests to terraform011 branch.

Usage

Create Elasticsearch domain with public endpoint

module "es" {
  source  = "git::https://github.com/terraform-community-modules/tf_aws_elasticsearch.git?ref=v1.1.0"

  domain_name                    = "my-elasticsearch-domain"
  management_public_ip_addresses = ["34.203.XXX.YYY"]
  instance_count                 = 16
  instance_type                  = "m4.2xlarge.elasticsearch"
  dedicated_master_type          = "m4.large.elasticsearch"
  es_zone_awareness              = true
  ebs_volume_size                = 100
}

Create Elasticsearch domain within a VPC and CloudWatch logs

module "es" {
  source  = "git::https://github.com/terraform-community-modules/tf_aws_elasticsearch.git?ref=v1.1.0"

  domain_name                    = "my-elasticsearch-domain"
  vpc_options                    = {
    security_group_ids = ["sg-XXXXXXXX"]
    subnet_ids         = ["subnet-YYYYYYYY"]
  }
  instance_count                 = 1
  instance_type                  = "t2.medium.elasticsearch"
  dedicated_master_type          = "t2.medium.elasticsearch"
  es_zone_awareness              = false
  ebs_volume_size                = 35
  
  advanced_options = {
    "rest.action.multi.allow_explicit_index" = "true"   # double quotes are required here
  }

  log_publishing_options = [
    {
      cloudwatch_log_group_arn = "arn:aws:logs:eu-central-1:604506250243:log-group:es:*"
      log_type                 = "INDEX_SLOW_LOGS"
      enabled                  = true
    },
    {
      cloudwatch_log_group_arn = "arn:aws:logs:eu-central-1:604506250243:log-group:es:*"
      log_type                 = "SEARCH_SLOW_LOGS"
      enabled                  = true
    },
    {
      cloudwatch_log_group_arn = "arn:aws:logs:eu-central-1:604506250243:log-group:es:*"
      log_type                 = "ES_APPLICATION_LOGS"
      enabled                  = true
    }
  ]
}

Create small (4-node) Elasticsearch domain in a VPC with dedicated master nodes

module "es" {
  source  = "git::https://github.com/terraform-community-modules/tf_aws_elasticsearch.git?ref=v1.1.0"

  domain_name                    = "my-elasticsearch-domain"
  vpc_options                    = {
    security_group_ids = ["sg-XXXXXXXX"]
    subnet_ids         = ["subnet-YYYYYYYY"]
  }
  instance_count                 = 4
  instance_type                  = "m4.2xlarge.elasticsearch"
  dedicated_master_threshold     = 4
  dedicated_master_type          = "m4.large.elasticsearch"
  es_zone_awareness              = true
  ebs_volume_size                = 100
}

Inputs

Name Description Type Default Required
advanced_options Map of key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing Terraform to want to recreate your Elasticsearch domain on every apply. map(string) {} no
create_iam_service_linked_role Whether to create IAM service linked role for AWS ElasticSearch service. Can be only one per AWS account. bool "true" no
dedicated_master_threshold The number of instances above which dedicated master nodes will be used. Default: 10 number "10" no
dedicated_master_type ES instance type to be used for dedicated masters (default same as instance_type) string "false" no
domain_name Domain name for Elasticsearch cluster string "es-domain" no
domain_prefix String to be prefixed to search domain. Default: tf- string "tf-" no
ebs_volume_size Optionally use EBS volumes for data storage by specifying volume size in GB (default 0) number "0" no
ebs_volume_type Storage type of EBS volumes, if used (default gp2) string "gp2" no
encrypt_at_rest Enable encrption at rest (only specific instance family types support it: m4, c4, r4, i2, i3 default: false) bool "false" no
enforce_https Whether or not to require HTTPS. bool "false" no
es_version Version of Elasticsearch to deploy (default 5.1) string "5.1" no
es_zone_awareness Enable zone awareness for Elasticsearch cluster (default false) bool "false" no
es_zone_awareness_count Number of availability zones used for data nodes (default 2) number "2" no
instance_count Number of data nodes in the cluster (default 6) number "6" no
instance_type ES instance type for data nodes in the cluster (default t2.small.elasticsearch) string "t2.small.elasticsearch" no
kms_key_id KMS key used for elasticsearch string "" no
log_publishing_options List of maps of options for publishing slow logs to CloudWatch Logs. list(map(string)) [] no
management_iam_roles List of IAM role ARNs from which to permit management traffic (default ['*']). Note that a client must match both the IP address and the IAM role patterns in order to be permitted access. list(string) [ "*" ] no
management_public_ip_addresses List of IP addresses from which to permit management traffic (default []). Note that a client must match both the IP address and the IAM role patterns in order to be permitted access. list(string) [] no
node_to_node_encryption_enabled Whether to enable node-to-node encryption. bool "false" no
snapshot_start_hour Hour at which automated snapshots are taken, in UTC (default 0) number "0" no
tags tags to apply to all resources map(string) {} no
tls_security_policy The name of the TLS security policy that needs to be applied to the HTTPS endpoint. Example values: Policy-Min-TLS-1-0-2019-07 and Policy-Min-TLS-1-2-2019-07. Terraform will only perform drift detection if a configuration value is provided. string "null" no
use_prefix Flag indicating whether or not to use the domain_prefix. Default: true bool "true" no
vpc_options A map of supported vpc options map(list(string)) { "security_group_ids": [], "subnet_ids": [] } no

Outputs

Name Description
arn Amazon Resource Name (ARN) of the domain
domain_id Unique identifier for the domain
domain_name The name of the Elasticsearch domain
endpoint Domain-specific endpoint used to submit index, search, and data upload requests
kibana_endpoint Domain-specific endpoint for kibana without https scheme

Authors

Originally created by Steve Huff, Alexander Gramovich and these awesome contributors.

Module managed by Anton Babenko.

License

MIT licensed. See LICENSE.md for full details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].