Skip to content

Commit b5651e4

Browse files
committed
update README.md
1 parent 84b4ead commit b5651e4

File tree

1 file changed

+229
-52
lines changed

1 file changed

+229
-52
lines changed

README.md

Lines changed: 229 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -69,66 +69,235 @@ This module has a few dependencies:
6969

7070

7171
Here are examples of how you can use this module in your inventory structure:
72-
### Single Node
72+
### Multi Node non vpc
7373
```hcl
74-
module "elasticsearch" {
75-
source = "clouddrove/elasticsearch/aws"
76-
version = "0.15.0"
77-
name = "es"
78-
environment = "test"
79-
label_order = ["name", "environment"]
80-
enable_iam_service_linked_role = true
81-
security_group_ids = [module.security_group.security_group_ids]
82-
subnet_ids = tolist(module.public_subnets.public_subnet_id)
83-
elasticsearch_version = "7.1"
84-
instance_type = "t2.small.elasticsearch"
85-
instance_count = 1
86-
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
87-
volume_size = 30
88-
volume_type = "gp2"
89-
log_publishing_application_enabled = true
90-
log_publishing_search_cloudwatch_log_group_arn = true
91-
log_publishing_index_cloudwatch_log_group_arn = true
92-
93-
dns_enabled = true
94-
es_hostname = "es"
95-
kibana_hostname = "kibana"
96-
dns_zone_id = "Z1XJD7SSBKXLC1"
74+
module "elasticsearch" {
75+
source = "clouddrove/elasticsearch/aws"
76+
77+
name = "es"
78+
environment = "test"
79+
label_order = ["name", "environment"]
80+
domain_name = "clouddrove"
81+
82+
#IAM
83+
enable_iam_service_linked_role = false
84+
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
85+
86+
#Networking
87+
vpc_enabled = false
88+
availability_zone_count = 2
89+
zone_awareness_enabled = true
90+
allowed_cidr_blocks = ["51.79.69.69"]
91+
92+
93+
#ES
94+
elasticsearch_version = "7.8"
95+
instance_type = "c5.large.elasticsearch"
96+
instance_count = 2
97+
98+
# Volumes
99+
volume_size = 30
100+
volume_type = "gp2"
101+
102+
#DNS
103+
dns_enabled = false
104+
es_hostname = "es"
105+
kibana_hostname = "kibana"
106+
dns_zone_id = false
107+
108+
advanced_options = {
109+
"rest.action.multi.allow_explicit_index" = "true"
110+
}
97111
98-
advanced_options = {
99-
"rest.action.multi.allow_explicit_index" = "true"
112+
#Cognito
113+
cognito_enabled = false
114+
user_pool_id = ""
115+
identity_pool_id = ""
116+
117+
#logs
118+
log_publishing_index_enabled = true
119+
log_publishing_search_enabled = true
120+
log_publishing_application_enabled = true
121+
log_publishing_audit_enabled = false
100122
}
101123
}
124+
102125
```
103-
### Multi Node
126+
### Multi Node vpc
104127
```hcl
105128
module "elasticsearch" {
106-
source = "clouddrove/elasticsearch/aws"
107-
version = "0.15.0"
108-
name = "es"
109-
environment = "test"
110-
label_order = ["name", "environment"]
111-
domain_name = "clouddrove"
112-
enable_iam_service_linked_role = true
113-
security_group_ids = [module.security_group.security_group_ids]
114-
subnet_ids = tolist(module.public_subnets.public_subnet_id)
115-
zone_awareness_enabled = true
116-
availability_zone_count = 2
117-
elasticsearch_version = "7.1"
118-
instance_type = "t2.small.elasticsearch"
119-
instance_count = 2
129+
source = "clouddrove/elasticsearch/aws"
130+
131+
name = "es"
132+
environment = "test"
133+
label_order = ["name", "environment"]
134+
domain_name = "clouddrove"
135+
136+
#IAM
137+
enable_iam_service_linked_role = false
120138
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
121-
volume_size = 30
122-
volume_type = "gp2"
123-
dns_enabled = true
139+
140+
#Networking
141+
vpc_enabled = true
142+
security_group_ids = [module.security_group.security_group_ids]
143+
subnet_ids = tolist(module.public_subnets.public_subnet_id)
144+
availability_zone_count = length(module.public_subnets.public_subnet_id)
145+
zone_awareness_enabled = true
146+
147+
148+
#ES
149+
elasticsearch_version = "7.8"
150+
instance_type = "c5.large.elasticsearch"
151+
instance_count = 2
152+
153+
# Volumes
154+
volume_size = 30
155+
volume_type = "gp2"
156+
157+
#DNS
158+
dns_enabled = false
124159
es_hostname = "es"
125160
kibana_hostname = "kibana"
126-
dns_zone_id = "Z1XJD7SSBKXLC1"
161+
dns_zone_id = false
162+
127163
advanced_options = {
128164
"rest.action.multi.allow_explicit_index" = "true"
129165
}
166+
167+
#Cognito
168+
cognito_enabled = false
169+
user_pool_id = ""
170+
identity_pool_id = ""
171+
172+
#logs
173+
log_publishing_index_enabled = true
174+
log_publishing_search_enabled = true
175+
log_publishing_application_enabled = true
176+
log_publishing_audit_enabled = false
177+
}
178+
```
179+
180+
### Single Node Non vpc
181+
```hcl
182+
source = "clouddrove/elasticsearch/aws"
183+
184+
name = "es"
185+
environment = "test"
186+
label_order = ["name", "environment"]
187+
188+
#IAM
189+
190+
enable_iam_service_linked_role = false
191+
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
192+
193+
194+
#Networking
195+
196+
vpc_enabled = false
197+
allowed_cidr_blocks = ["51.79.69.69"]
198+
199+
200+
#Es
201+
elasticsearch_version = "7.8"
202+
instance_type = "c5.large.elasticsearch"
203+
instance_count = 1
204+
205+
#Volume
206+
volume_size = 30
207+
volume_type = "gp2"
208+
209+
#Logs
210+
log_publishing_application_enabled = true
211+
log_publishing_search_cloudwatch_log_group_arn = true
212+
log_publishing_index_cloudwatch_log_group_arn = true
213+
214+
215+
216+
#Cognito
217+
cognito_enabled = false
218+
user_pool_id = ""
219+
identity_pool_id = ""
220+
221+
#DNS
222+
kibana_hostname = "kibana"
223+
dns_zone_id = "Z1XJD7SSBKXLC1"
224+
dns_enabled = false
225+
es_hostname = "es"
226+
227+
228+
advanced_options = {
229+
"rest.action.multi.allow_explicit_index" = "true"
230+
}
231+
232+
enforce_https = true
233+
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
234+
public_enabled = false
235+
236+
}
237+
```
238+
239+
### Single Node vpc
240+
241+
```hcl
242+
module "elasticsearch" {
243+
source = "clouddrove/elasticsearch/aws"
244+
245+
name = "es"
246+
environment = "test"
247+
label_order = ["name", "environment"]
248+
249+
#IAM
250+
enable_iam_service_linked_role = false
251+
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
252+
253+
254+
#Networking
255+
256+
vpc_enabled = true
257+
security_group_ids = [module.security_group.security_group_ids]
258+
subnet_ids = tolist(module.public_subnets.public_subnet_id)
259+
260+
261+
#Es
262+
263+
elasticsearch_version = "7.8"
264+
instance_type = "c5.large.elasticsearch"
265+
instance_count = 1
266+
267+
#Volume
268+
volume_size = 30
269+
volume_type = "gp2"
270+
271+
#Logs
272+
log_publishing_application_enabled = true
273+
log_publishing_search_cloudwatch_log_group_arn = true
274+
log_publishing_index_cloudwatch_log_group_arn = true
275+
276+
277+
278+
#Cognito
279+
cognito_enabled = false
280+
user_pool_id = ""
281+
identity_pool_id = ""
282+
283+
#DNS
284+
kibana_hostname = "kibana"
285+
dns_zone_id = "Z1XJD7SSBKXLC1"
286+
dns_enabled = false
287+
es_hostname = "es"
288+
289+
290+
advanced_options = {
291+
"rest.action.multi.allow_explicit_index" = "true"
292+
}
293+
294+
enforce_https = true
295+
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
296+
public_enabled = false
297+
130298
}
131299
```
300+
132301
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)
133302

134303

@@ -141,11 +310,20 @@ Note: There are some type of instances which not support encryption and EBS opti
141310
| Name | Description | Type | Default | Required |
142311
|------|-------------|------|---------|:--------:|
143312
| advanced\_options | Key-value string pairs to specify advanced configuration options. | `map(string)` | `{}` | no |
313+
| advanced\_security\_options\_enabled | AWS Elasticsearch Kibana enchanced security plugin enabling (forces new resource) | `bool` | `false` | no |
314+
| advanced\_security\_options\_internal\_user\_database\_enabled | Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin | `bool` | `false` | no |
315+
| advanced\_security\_options\_master\_user\_arn | ARN of IAM user who is to be mapped to be Kibana master user (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to false) | `string` | `""` | no |
316+
| advanced\_security\_options\_master\_user\_name | Master user username (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
317+
| advanced\_security\_options\_master\_user\_password | Master user password (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
318+
| allowed\_cidr\_blocks | List of CIDR blocks to be allowed to connect to the cluster | `list(string)` | `[]` | no |
144319
| attributes | Additional attributes (e.g. `1`). | `list(any)` | `[]` | no |
145320
| automated\_snapshot\_start\_hour | Hour at which automated snapshots are taken, in UTC. | `number` | `0` | no |
146321
| availability\_zone\_count | Number of Availability Zones for the domain to use. | `number` | `2` | no |
147322
| cloudwatch\_kms\_key\_id | The KMS key ID to encrypt the Cloudwatch logs. | `string` | `""` | no |
148323
| cognito\_enabled | Set to false to prevent enable cognito. | `bool` | `true` | no |
324+
| custom\_endpoint | Fully qualified domain for custom endpoint. | `string` | `""` | no |
325+
| custom\_endpoint\_certificate\_arn | ACM certificate ARN for custom endpoint. | `string` | `""` | no |
326+
| custom\_endpoint\_enabled | Whether to enable custom endpoint for the Elasticsearch domain. | `bool` | `false` | no |
149327
| dedicated\_master\_count | Number of dedicated master nodes in the cluster. | `number` | `0` | no |
150328
| dedicated\_master\_enabled | Indicates whether dedicated master nodes are enabled for the cluster. | `bool` | `false` | no |
151329
| dedicated\_master\_type | Instance type of the dedicated master nodes in the cluster. | `string` | `"t2.small.elasticsearch"` | no |
@@ -158,29 +336,24 @@ Note: There are some type of instances which not support encryption and EBS opti
158336
| enable\_logs | enable logs | `bool` | `true` | no |
159337
| enabled | Set to false to prevent the module from creating any resources. | `bool` | `true` | no |
160338
| encrypt\_at\_rest\_enabled | Whether to enable encryption at rest. | `bool` | `true` | no |
161-
| encryption\_enabled | Whether to enable node-to-node encryption. | `bool` | `false` | no |
339+
| encryption\_enabled | Whether to enable node-to-node encryption. | `bool` | `true` | no |
162340
| enforce\_https | Whether or not to require HTTPS. | `bool` | `true` | no |
163341
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no |
164342
| es\_hostname | The Host name of elasticserch. | `string` | `""` | no |
165343
| iam\_actions | List of actions to allow for the IAM roles, _e.g._ `es:ESHttpGet`, `es:ESHttpPut`, `es:ESHttpPost`. | `list(string)` | `[]` | no |
166-
| iam\_authorizing\_role\_arns | List of IAM role ARNs to permit to assume the Elasticsearch user role. | `list(string)` | `[]` | no |
167-
| iam\_role\_arns | List of IAM role ARNs to permit access to the Elasticsearch domain. | `list(string)` | `[]` | no |
168344
| identity\_pool\_id | ID of the Cognito Identity Pool to use. | `string` | `""` | no |
169345
| instance\_count | Number of data nodes in the cluster. | `number` | `4` | no |
170346
| instance\_type | Elasticsearch instance type for data nodes in the cluster. | `string` | `"t2.small.elasticsearch"` | no |
171347
| iops | The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type. | `number` | `0` | no |
172348
| kibana\_hostname | The Host name of kibana. | `string` | `""` | no |
173349
| kms\_key\_id | The KMS key ID to encrypt the Elasticsearch domain with. If not specified, then it defaults to using the AWS/Elasticsearch service KMS key. | `string` | `""` | no |
174350
| label\_order | Label order, e.g. `name`,`application`. | `list(any)` | `[]` | no |
175-
| log\_publishing\_application\_cloudwatch\_log\_group\_arn | ARN of the CloudWatch log group to which log for ES\_APPLICATION\_LOGS needs to be published. | `string` | `""` | no |
176351
| log\_publishing\_application\_enabled | Specifies whether log publishing option for ES\_APPLICATION\_LOGS is enabled or not. | `bool` | `false` | no |
177-
| log\_publishing\_index\_cloudwatch\_log\_group\_arn | ARN of the CloudWatch log group to which log for INDEX\_SLOW\_LOGS needs to be published. | `string` | `""` | no |
352+
| log\_publishing\_audit\_enabled | Specifies whether log publishing option for AUDIT\_LOGS is enabled or not. | `bool` | `false` | no |
178353
| log\_publishing\_index\_enabled | Specifies whether log publishing option for INDEX\_SLOW\_LOGS is enabled or not. | `bool` | `false` | no |
179-
| log\_publishing\_search\_cloudwatch\_log\_group\_arn | ARN of the CloudWatch log group to which log for SEARCH\_SLOW\_LOGS needs to be published. | `string` | `""` | no |
180354
| log\_publishing\_search\_enabled | Specifies whether log publishing option for SEARCH\_SLOW\_LOGS is enabled or not. | `bool` | `false` | no |
181355
| managedby | ManagedBy, eg 'CloudDrove'. | `string` | `"hello@clouddrove.com"` | no |
182356
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no |
183-
| public\_enabled | Enable Elasticsearch cluster is public or not. | `bool` | `false` | no |
184357
| repository | Terraform current module repo | `string` | `"https://github.com/clouddrove/terraform-aws-elasticsearch"` | no |
185358
| retention\_in\_days | Days of retention of cloudwatch. | `number` | `90` | no |
186359
| security\_group\_ids | Security Group IDs. | `list(string)` | `[]` | no |
@@ -192,6 +365,10 @@ Note: There are some type of instances which not support encryption and EBS opti
192365
| user\_pool\_id | ID of the Cognito User Pool to use. | `string` | `""` | no |
193366
| volume\_size | EBS volumes for data storage in GB. | `number` | `0` | no |
194367
| volume\_type | Storage type of EBS volumes. | `string` | `"gp2"` | no |
368+
| vpc\_enabled | Set to false if ES should be deployed outside of VPC. | `bool` | `true` | no |
369+
| warm\_count | Number of UltraWarm nodes | `number` | `2` | no |
370+
| warm\_enabled | Whether AWS UltraWarm is enabled | `bool` | `false` | no |
371+
| warm\_type | Type of UltraWarm nodes | `string` | `"ultrawarm1.medium.elasticsearch"` | no |
195372
| zone\_awareness\_enabled | Enable zone awareness for Elasticsearch cluster. | `bool` | `false` | no |
196373

197374
## Outputs

0 commit comments

Comments
 (0)