Commit de6ff9d0 by Kevin Falcone

Merge pull request #3058 from edx/jibsheet/remove-elasticsearch-terraform

This code has moved to an es module in the terraform repo
parents 9dad212d 08736fa5
This directory contains various modules for building out infrastructure using terraform.
This directory contains the remains of an original attempt at using terraform.
The goal is to have modules here that represent reusable chunks of terraform and that teams can build
their own infrastructure by gluing together modules they find useful.
Future work has been moved to a new repository. Work is planned to open source our terraform modules.
resource "aws_elasticsearch_domain" "es" {
domain_name = "${var.es_domain_name}"
advanced_options {
"rest.action.multi.allow_explicit_index" = true
}
cluster_config {
instance_type = "${var.es_instance_type}"
instance_count = "${var.es_instance_count}"
zone_awareness_enabled = "${var.es_zone_awareness}"
}
ebs_options {
ebs_enabled = true
volume_size = "${var.es_ebs_volume_size}"
}
access_policies = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "es:*",
"Principal": "*",
"Effect": "Allow",
"Condition": {
"IpAddress": {"aws:SourceIp": ${var.source_ip}}
}
}
]
}
EOF
snapshot_options {
automated_snapshot_start_hour = 0
}
}
output "endpoint" {
value = "${endpoint}"
}
variable "aws_region" {
default = "us-east-1"
}
variable "es_domain_name" { }
variable "es_instance_type" {
default = "m3.medium.elasticsearch"
}
variable "es_zone_awareness" {
default = false
}
variable "es_instance_count" {
default = "1"
}
variable "es_ebs_volume_size" {
default = "10"
}
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