Skip to content

Commit

Permalink
Merge pull request #28 from egarbi/adds_support_for_0.14
Browse files Browse the repository at this point in the history
Adds support for 0.14
  • Loading branch information
egarbi authored Dec 17, 2020
2 parents 41b6ec5 + 89bae2b commit f18c817
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
23 changes: 15 additions & 8 deletions example/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 2.0"
}
}
}
# Configure the AWS Provider
provider "aws" {
version = "~> 2.0"
region = "eu-central-1"
}

Expand All @@ -9,12 +16,12 @@ data "aws_vpc" "default" {
}

data "aws_subnet_ids" "default" {
vpc_id = "${data.aws_vpc.default.id}"
vpc_id = data.aws_vpc.default.id
}

data "aws_subnet" "default" {
count = "${length(data.aws_subnet_ids.default.ids)}"
id = "${tolist(data.aws_subnet_ids.default.ids)[count.index]}"
count = length(data.aws_subnet_ids.default.ids)
id = tolist(data.aws_subnet_ids.default.ids)[count.index]
}

data "aws_route53_zone" "selected" {
Expand All @@ -29,13 +36,13 @@ module "es-cluster" {
source = "../"

name = "example"
vpc_id = "${data.aws_vpc.default.id}"
subnet_ids = ["${data.aws_subnet.default.0.id}", "${data.aws_subnet.default.1.id}"]
zone_id = "${data.aws_route53_zone.selected.zone_id}"
vpc_id = data.aws_vpc.default.id
subnet_ids = [data.aws_subnet.default.0.id, data.aws_subnet.default.1.id]
zone_id = data.aws_route53_zone.selected.zone_id
itype = "m4.large.elasticsearch"
icount = 2
zone_awareness = true
ingress_allow_cidr_blocks = ["${data.aws_vpc.default.cidr_block}"]
ingress_allow_cidr_blocks = [data.aws_vpc.default.cidr_block]
access_policies = <<CONFIG
{
"Version": "2012-10-17",
Expand Down
14 changes: 7 additions & 7 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
output "es_arn" {
description = "Amazon Resource Name (ARN) of the domain"
value = "${aws_elasticsearch_domain.es.arn}"
value = aws_elasticsearch_domain.es.arn
}

output "es_availability_zones_ids" {
description = "If the domain was created inside a VPC, the names of the availability zones the configured subnet_ids were created inside."
value = "${aws_elasticsearch_domain.es.vpc_options.0.availability_zones}"
value = aws_elasticsearch_domain.es.vpc_options.0.availability_zones
}

output "es_domain_id" {
description = "Unique identifier for the domain."
value = "${aws_elasticsearch_domain.es.domain_id}"
value = aws_elasticsearch_domain.es.domain_id
}

output "es_endpoint" {
description = "Domain-specific endpoint used to submit index, search, and data upload requests."
value = "${aws_elasticsearch_domain.es.endpoint}"
value = aws_elasticsearch_domain.es.endpoint
}

output "es_kibana_endpoint" {
description = "Domain-specific endpoint for kibana without https scheme."
value = "${aws_elasticsearch_domain.es.kibana_endpoint}"
value = aws_elasticsearch_domain.es.kibana_endpoint
}

output "es_sg" {
description = "The SG id created to allow communication with ElasticSearch cluster."
value = "${aws_security_group.elasticsearch.id}"
value = aws_security_group.elasticsearch.id
}

output "es_vpc_ids" {
description = "The VPC ID if the domain was created inside a VPC."
value = "${aws_elasticsearch_domain.es.vpc_options.0.vpc_id}"
value = aws_elasticsearch_domain.es.vpc_options.0.vpc_id
}
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variable "name" {

variable "subnet_ids" {
description = "List of VPC Subnet IDs for the Elastic Search Service EndPoints will be created."
type = list
type = list(string)
}

variable "vpc_id" {
Expand Down Expand Up @@ -77,13 +77,13 @@ variable "indices_query_bool_max_clause_count" {
variable "ingress_allow_cidr_blocks" {
default = []
description = "Specifies the ingress CIDR blocks allowed."
type = list
type = list(string)
}

variable "ingress_allow_security_groups" {
default = []
description = "Specifies the ingress security groups allowed."
type = list
type = list(string)
}

variable "itype" {
Expand Down

0 comments on commit f18c817

Please sign in to comment.