Hi,
I am trying to deploy an elasticserach node with node_to_node_encryption enabled, but getting following error when I am running terraform plan command.
Error: Unsupported block type
│
│ on main.tf line 19, in resource "aws_elasticsearch_domain" "elasticsearch":
│ 19: node_to_node_encryption_options {
│
│ Blocks of type "node_to_node_encryption_options" are not expected here.
main.tf
# Configure the AWS provider
provider "aws" {
region = var.region
}
# Define the Elasticsearch domain
resource "aws_elasticsearch_domain" "elasticsearch" {
domain_name = var.name
elasticsearch_version = var.elasticsearch_version
cluster_config {
instance_type = var.instance_type
instance_count = var.instance_count
dedicated_master_enabled = false
}
ebs_options {
ebs_enabled = true
volume_size = var.volume_size
}
node_to_node_encryption_options {
enabled = true
}
tags = {
Environment = var.environment
}
}
variables.tf
variable "name" {
type = string
}
variable "region" {
type = string
}
variable "elasticsearch_version" {
type = string
}
variable "instance_type" {
type = string
}
variable "instance_count" {
type = number
}
variable "volume_size" {
type = number
}
variable "environment" {
type = string
}
terraform.tfvars
name = "my-elasticsearch"
region = "us-west-2"
elasticsearch_version = "7.18"
instance_type = "t2.small.elasticsearch"
instance_count = 1
volume_size = 10
environment = "dev"
Any clue why am I getting the error? thanks