Commit cdf372b8 by Fred Smith

Merge pull request #2754 from edx/derf/terraform_elasticsearch_defaults

change elasticsearch defaults to be more conservative
parents 7412b276 5200d8e0
...@@ -6,7 +6,7 @@ resource "aws_elasticsearch_domain" "es" { ...@@ -6,7 +6,7 @@ resource "aws_elasticsearch_domain" "es" {
cluster_config { cluster_config {
instance_type = "${var.es_instance_type}" instance_type = "${var.es_instance_type}"
instance_count = "${var.es_instance_count}" instance_count = "${var.es_instance_count}"
zone_awareness_enabled = true zone_awareness_enabled = "${var.es_zone_awareness}"
} }
ebs_options { ebs_options {
ebs_enabled = true ebs_enabled = true
...@@ -21,7 +21,7 @@ resource "aws_elasticsearch_domain" "es" { ...@@ -21,7 +21,7 @@ resource "aws_elasticsearch_domain" "es" {
"Principal": "*", "Principal": "*",
"Effect": "Allow", "Effect": "Allow",
"Condition": { "Condition": {
"IpAddress": {"aws:SourceIp": ["${var.source_ip}"]} "IpAddress": {"aws:SourceIp": ${var.source_ip}}
} }
} }
] ]
......
...@@ -3,13 +3,16 @@ variable "aws_region" { ...@@ -3,13 +3,16 @@ variable "aws_region" {
} }
variable "es_domain_name" { } variable "es_domain_name" { }
variable "es_instance_type" { variable "es_instance_type" {
default = "m3.large.elasticsearch" default = "m3.medium.elasticsearch"
}
variable "es_zone_awareness" {
default = false
} }
variable "es_instance_count" { variable "es_instance_count" {
default = "5" default = "1"
} }
variable "es_ebs_volume_size" { variable "es_ebs_volume_size" {
default = "100" default = "10"
} }
variable "source_ip" { } variable "source_ip" { }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment