Elasticsearch domain without node-to-node encryption

Encrypt communication between nodes within an Elasticsearch domain.

Description

Node-to-node TLS protects index and document data exchanged inside an Elasticsearch domain. Configure client HTTPS, encryption at rest and access policies separately.

Potential impact

Someone with access to unencrypted internal traffic could read data moving between nodes.

Remediation

Set enabled = true in node_to_node_encryption. New Elasticsearch domains require version 6.0 or later. Enabling it in place on an existing domain requires 6.7 or later. You cannot turn it off on the same domain. Check the Terraform plan for replacement and migrate data first if replacement is required. Verify the applied node-to-node setting.

Examples

Both excerpts use r4.large.elasticsearch. Only the second specifies node-to-node encryption. Set var.elasticsearch_version to a version that supports both that instance type and encryption.

Before

hcl
resource "aws_elasticsearch_domain" "example" {
  domain_name           = "example"
  elasticsearch_version = var.elasticsearch_version

  cluster_config {
    instance_type = "r4.large.elasticsearch"
  }
}

After

hcl
resource "aws_elasticsearch_domain" "example" {
  domain_name           = "example"
  elasticsearch_version = var.elasticsearch_version

  cluster_config {
    instance_type = "r4.large.elasticsearch"
  }

  node_to_node_encryption {
    enabled = true
  }
}

References