File tree 2 files changed +21
-2
lines changed 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ variable "es_application_name" {
7
7
variable "es_instance_count" {
8
8
type = number
9
9
description = " Number of instances in the cluster"
10
- default = 1
10
+ default = 2
11
11
}
12
12
13
13
variable "es_dedicated_master_type" {
@@ -36,7 +36,7 @@ variable "es_volume_size" {
36
36
variable "es_ebs_iops" {
37
37
type = number
38
38
description = " Baseline input/output (I/O) performance of EBS volumes attached to data nodes"
39
- default = 1000
39
+ default = 3000
40
40
}
41
41
42
42
variable "es_engine_version" {
Original file line number Diff line number Diff line change @@ -158,4 +158,23 @@ module "secret" {
158
158
})
159
159
}
160
160
161
+ resource "aws_iam_role_policy_attachment" "test-attach" {
162
+ count = var. elasticsearch_enabled ? 1 : 0
163
+
164
+ role = module. pod_role . name
165
+ policy_arn = " arn:aws:iam::aws:policy/aws-service-role/AmazonElasticsearchServiceRolePolicy"
166
+
167
+ depends_on = [ module . pod_policy ]
168
+ }
169
+
170
+ module "pod_policy" {
171
+ count = var. elasticsearch_enabled ? 1 : 0
172
+ source = " github.com/thoughtbot/flightdeck//aws/service-account-policy?ref=v0.9.0"
173
+
174
+ name = " es-${ var . es_application_name } -pods"
175
+ policy_documents = module. secret [* ]. policy_json
176
+
177
+ role_names = [module . pod_role . name ]
178
+ }
179
+
161
180
data "aws_region" "current" {}
You can’t perform that action at this time.
0 commit comments