Конфиг такой:
resource "aws_elasticsearch_domain" "es" {
domain_name = "test"
elasticsearch_version = "5.3"
cluster_config {
instance_type = "m4.large.elasticsearch"
instance_count = 1
}
advanced_options {
"rest.action.multi.allow_explicit_index" = "true"
}
ebs_options {
ebs_enabled = true
volume_type = "gp2"
volume_size = "10"
}
access_policies = «CONFIG
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"es:ESHttpGet",
"es:ESHttpPut",
"es:ESHttpPost",
"es:ESHttpHead"
],
"Effect": "Allow",
"Principal": "*",
"Condition": {
"IpAddress": {"aws:SourceIp": ["${aws_eip.eip.public_ip}"]}
}
},
{
"Action": "es:*",
"Effect": "Allow",
"Principal": "*",
"Condition": {
"IpAddress": {"aws:SourceIp": ["
192.168.1.1", "
192.168.1.2"]}
}
}
]
}
CONFIG
snapshot_options {
automated_snapshot_start_hour = 8
}
tags {
Domain = "Test"
}
}