-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathREADME.yaml
275 lines (214 loc) · 7.14 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: Terraform AWS Elasticsearch
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-aws-elasticsearch
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-aws-elasticsearch.svg"
url: "https://github.com/clouddrove/terraform-aws-elasticsearch/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-aws-elasticsearch/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-aws-elasticsearch/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
- name: "Changelog"
image: "https://img.shields.io/badge/Changelog-blue"
url: "CHANGELOG.md"
prerequesties:
- name: Terraform
url: https://learn.hashicorp.com/terraform/getting-started/install.html
version: ">= 1.6.6"
providers:
- name: aws
url: https://aws.amazon.com/
version: ">= 5.31.0"
module_dependencies:
- name: Labels Module
url: https://github.com/clouddrove/terraform-aws-labels
description: Provides resource tagging.
# description of this project
description: |-
Terraform module to create an Elasticsearch resource on AWS.
# How to use this project
# yamllint disable rule:line-length
usage: |-
Here are examples of how you can use this module in your inventory structure:
### Multi Node non vpc
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
name = "es"
environment = "test"
label_order = ["name", "environment"]
domain_name = "clouddrove"
#IAM
enable_iam_service_linked_role = false
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
#Networking
vpc_enabled = false
availability_zone_count = 2
zone_awareness_enabled = true
allowed_cidr_blocks = ["51.79.69.69"]
#ES
elasticsearch_version = "7.8"
instance_type = "c5.large.elasticsearch"
instance_count = 2
# Volumes
volume_size = 30
volume_type = "gp2"
#DNS
dns_enabled = false
es_hostname = "es"
kibana_hostname = "kibana"
dns_zone_id = false
advanced_options = {
"rest.action.multi.allow_explicit_index" = "true"
}
#Cognito
cognito_enabled = false
user_pool_id = ""
identity_pool_id = ""
#logs
log_publishing_index_enabled = true
log_publishing_search_enabled = true
log_publishing_application_enabled = true
log_publishing_audit_enabled = false
}
}
```
### Multi Node vpc
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
name = "es"
environment = "test"
label_order = ["name", "environment"]
domain_name = "clouddrove"
#IAM
enable_iam_service_linked_role = false
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
#Networking
vpc_enabled = true
security_group_ids = [module.security_group.security_group_ids]
subnet_ids = tolist(module.public_subnets.public_subnet_id)
availability_zone_count = length(module.public_subnets.public_subnet_id)
zone_awareness_enabled = true
#ES
elasticsearch_version = "7.8"
instance_type = "c5.large.elasticsearch"
instance_count = 2
# Volumes
volume_size = 30
volume_type = "gp2"
#DNS
dns_enabled = false
es_hostname = "es"
kibana_hostname = "kibana"
dns_zone_id = false
advanced_options = {
"rest.action.multi.allow_explicit_index" = "true"
}
#Cognito
cognito_enabled = false
user_pool_id = ""
identity_pool_id = ""
#logs
log_publishing_index_enabled = true
log_publishing_search_enabled = true
log_publishing_application_enabled = true
log_publishing_audit_enabled = false
}
```
### Single Node Non vpc
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
name = "es"
environment = "test"
label_order = ["name", "environment"]
#IAM
enable_iam_service_linked_role = false
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
#Networking
vpc_enabled = false
allowed_cidr_blocks = ["51.79.69.69"]
#Es
elasticsearch_version = "7.8"
instance_type = "c5.large.elasticsearch"
instance_count = 1
#Volume
volume_size = 30
volume_type = "gp2"
#Logs
log_publishing_application_enabled = true
log_publishing_search_cloudwatch_log_group_arn = true
log_publishing_index_cloudwatch_log_group_arn = true
#Cognito
cognito_enabled = false
user_pool_id = ""
identity_pool_id = ""
#DNS
kibana_hostname = "kibana"
dns_zone_id = "Z1XJD7SSBKXLC1"
dns_enabled = false
es_hostname = "es"
advanced_options = {
"rest.action.multi.allow_explicit_index" = "true"
}
enforce_https = true
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
public_enabled = false
}
```
### Single Node vpc
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
name = "es"
environment = "test"
label_order = ["name", "environment"]
#IAM
enable_iam_service_linked_role = false
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
#Networking
vpc_enabled = true
security_group_ids = [module.security_group.security_group_ids]
subnet_ids = tolist(module.public_subnets.public_subnet_id)
#Es
elasticsearch_version = "7.8"
instance_type = "c5.large.elasticsearch"
instance_count = 1
#Volume
volume_size = 30
volume_type = "gp2"
#Logs
log_publishing_application_enabled = true
log_publishing_search_cloudwatch_log_group_arn = true
log_publishing_index_cloudwatch_log_group_arn = true
#Cognito
cognito_enabled = false
user_pool_id = ""
identity_pool_id = ""
#DNS
kibana_hostname = "kibana"
dns_zone_id = "Z1XJD7SSBKXLC1"
dns_enabled = false
es_hostname = "es"
advanced_options = {
"rest.action.multi.allow_explicit_index" = "true"
}
enforce_https = true
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
public_enabled = false
}
```
Note: There are some type of instances which not support encryption and EBS option, Please read about this [here](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Also, there are some limitation for instance type, Please read [here](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-limits.html)