Skip to content

Commit c7d3a49

Browse files
pkoracamaximmi
andauthored
Support 3 AZs for Terraform 0.11 (#29)
* Support 3AZ * make docs Co-authored-by: Maxim Mironenko <simixido@gmail.com>
1 parent 228116c commit c7d3a49

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ Available targets:
149149
| allowed_cidr_blocks | List of CIDR blocks to be allowed to connect to the cluster | list | `<list>` | no |
150150
| attributes | Additional attributes (e.g. `1`) | list | `<list>` | no |
151151
| automated_snapshot_start_hour | Hour at which automated snapshots are taken, in UTC | string | `0` | no |
152+
| availability_zone_count | Number of Availability Zones for the domain to use. | string | `3` | no |
152153
| create_iam_service_linked_role | Whether to create `AWSServiceRoleForAmazonElasticsearchService` service-linked role. Set it to `false` if you already have an ElasticSearch cluster created in the AWS account and AWSServiceRoleForAmazonElasticsearchService already exists. See https://github.com/terraform-providers/terraform-provider-aws/issues/5218 for more info | string | `true` | no |
153154
| dedicated_master_count | Number of dedicated master nodes in the cluster | string | `0` | no |
154155
| dedicated_master_enabled | Indicates whether dedicated master nodes are enabled for the cluster | string | `false` | no |
@@ -352,6 +353,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
352353
[sarkis_homepage]: https://github.com/sarkis
353354
[sarkis_avatar]: https://img.cloudposse.com/150x150/https://github.com/sarkis.png
354355

356+
355357
[![README Footer][readme_footer_img]][readme_footer_link]
356358
[![Beacon][beacon]][website]
357359

docs/terraform.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| allowed_cidr_blocks | List of CIDR blocks to be allowed to connect to the cluster | list | `<list>` | no |
77
| attributes | Additional attributes (e.g. `1`) | list | `<list>` | no |
88
| automated_snapshot_start_hour | Hour at which automated snapshots are taken, in UTC | string | `0` | no |
9+
| availability_zone_count | Number of Availability Zones for the domain to use. | string | `3` | no |
910
| create_iam_service_linked_role | Whether to create `AWSServiceRoleForAmazonElasticsearchService` service-linked role. Set it to `false` if you already have an ElasticSearch cluster created in the AWS account and AWSServiceRoleForAmazonElasticsearchService already exists. See https://github.com/terraform-providers/terraform-provider-aws/issues/5218 for more info | string | `true` | no |
1011
| dedicated_master_count | Number of dedicated master nodes in the cluster | string | `0` | no |
1112
| dedicated_master_enabled | Indicates whether dedicated master nodes are enabled for the cluster | string | `false` | no |

main.tf

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "label" {
2-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.5.3"
2+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.7.0"
33
enabled = "${var.enabled}"
44
namespace = "${var.namespace}"
55
name = "${var.name}"
@@ -10,7 +10,7 @@ module "label" {
1010
}
1111

1212
module "user_label" {
13-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.5.3"
13+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.7.0"
1414
enabled = "${var.enabled}"
1515
namespace = "${var.namespace}"
1616
name = "${var.name}"
@@ -127,6 +127,10 @@ resource "aws_elasticsearch_domain" "default" {
127127
dedicated_master_count = "${var.dedicated_master_count}"
128128
dedicated_master_type = "${var.dedicated_master_type}"
129129
zone_awareness_enabled = "${var.zone_awareness_enabled}"
130+
131+
zone_awareness_config {
132+
availability_zone_count = "${var.availability_zone_count}"
133+
}
130134
}
131135

132136
node_to_node_encryption {

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ variable "node_to_node_encryption_enabled" {
216216
description = "Whether to enable node-to-node encryption"
217217
}
218218

219+
variable "availability_zone_count" {
220+
type = "string"
221+
default = "3"
222+
description = "Number of Availability Zones for the domain to use."
223+
}
224+
219225
variable "iam_role_max_session_duration" {
220226
default = 3600
221227
description = "The maximum session duration (in seconds) for the user role. Can have a value from 1 hour to 12 hours"

0 commit comments

Comments
 (0)