Skip to content

Commit b30e765

Browse files
Add support for ultraWarm and advanced security (#74)
* Add support for ultraWarm and advanced security * Updated README.md Co-authored-by: actions-bot <[email protected]>
1 parent 4335e96 commit b30e765

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ Available targets:
154154
|------|-------------|------|---------|:--------:|
155155
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
156156
| advanced\_options | Key-value string pairs to specify advanced configuration options | `map(string)` | `{}` | no |
157+
| advanced\_security\_options\_enabled | AWS Elasticsearch Kibana enchanced security plugin enabling (forces new resource) | `bool` | `false` | no |
158+
| advanced\_security\_options\_internal\_user\_database\_enabled | Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin | `bool` | `false` | no |
159+
| 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 |
160+
| advanced\_security\_options\_master\_user\_name | Master user username (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
161+
| advanced\_security\_options\_master\_user\_password | Master user password (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
157162
| allowed\_cidr\_blocks | List of CIDR blocks to be allowed to connect to the cluster | `list(string)` | `[]` | no |
158163
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
159164
| automated\_snapshot\_start\_hour | Hour at which automated snapshots are taken, in UTC | `number` | `0` | no |
@@ -210,6 +215,9 @@ Available targets:
210215
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
211216
| vpc\_enabled | Set to false if ES should be deployed outside of VPC. | `bool` | `true` | no |
212217
| vpc\_id | VPC ID | `string` | `null` | no |
218+
| warm\_count | Number of UltraWarm nodes | `number` | `2` | no |
219+
| warm\_enabled | Whether AWS UltraWarm is enabled | `bool` | `false` | no |
220+
| warm\_type | Type of UltraWarm nodes | `string` | `"ultrawarm1.medium.elasticsearch"` | no |
213221
| zone\_awareness\_enabled | Enable zone awareness for Elasticsearch cluster | `bool` | `true` | no |
214222

215223
## Outputs

docs/terraform.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
|------|-------------|------|---------|:--------:|
2222
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
2323
| advanced\_options | Key-value string pairs to specify advanced configuration options | `map(string)` | `{}` | no |
24+
| advanced\_security\_options\_enabled | AWS Elasticsearch Kibana enchanced security plugin enabling (forces new resource) | `bool` | `false` | no |
25+
| advanced\_security\_options\_internal\_user\_database\_enabled | Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin | `bool` | `false` | no |
26+
| 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 |
27+
| advanced\_security\_options\_master\_user\_name | Master user username (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
28+
| advanced\_security\_options\_master\_user\_password | Master user password (applicable if advanced\_security\_options\_internal\_user\_database\_enabled set to true) | `string` | `""` | no |
2429
| allowed\_cidr\_blocks | List of CIDR blocks to be allowed to connect to the cluster | `list(string)` | `[]` | no |
2530
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
2631
| automated\_snapshot\_start\_hour | Hour at which automated snapshots are taken, in UTC | `number` | `0` | no |
@@ -77,6 +82,9 @@
7782
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
7883
| vpc\_enabled | Set to false if ES should be deployed outside of VPC. | `bool` | `true` | no |
7984
| vpc\_id | VPC ID | `string` | `null` | no |
85+
| warm\_count | Number of UltraWarm nodes | `number` | `2` | no |
86+
| warm\_enabled | Whether AWS UltraWarm is enabled | `bool` | `false` | no |
87+
| warm\_type | Type of UltraWarm nodes | `string` | `"ultrawarm1.medium.elasticsearch"` | no |
8088
| zone\_awareness\_enabled | Enable zone awareness for Elasticsearch cluster | `bool` | `true` | no |
8189

8290
## Outputs

main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ resource "aws_elasticsearch_domain" "default" {
118118

119119
advanced_options = var.advanced_options
120120

121+
advanced_security_options {
122+
enabled = var.advanced_security_options_enabled
123+
internal_user_database_enabled = var.advanced_security_options_internal_user_database_enabled
124+
master_user_options {
125+
master_user_arn = var.advanced_security_options_master_user_arn
126+
master_user_name = var.advanced_security_options_master_user_name
127+
master_user_password = var.advanced_security_options_master_user_password
128+
}
129+
}
130+
121131
ebs_options {
122132
ebs_enabled = var.ebs_volume_size > 0 ? true : false
123133
volume_size = var.ebs_volume_size
@@ -142,6 +152,9 @@ resource "aws_elasticsearch_domain" "default" {
142152
dedicated_master_count = var.dedicated_master_count
143153
dedicated_master_type = var.dedicated_master_type
144154
zone_awareness_enabled = var.zone_awareness_enabled
155+
warm_enabled = var.warm_enabled
156+
warm_count = var.warm_count
157+
warm_type = var.warm_type
145158

146159
dynamic "zone_awareness_config" {
147160
for_each = null_resource.azs[*].triggers

variables.tf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ variable "instance_count" {
6464
default = 4
6565
}
6666

67+
variable "warm_enabled" {
68+
type = bool
69+
default = false
70+
description = "Whether AWS UltraWarm is enabled"
71+
}
72+
73+
variable "warm_count" {
74+
type = number
75+
default = 2
76+
description = "Number of UltraWarm nodes"
77+
}
78+
79+
variable "warm_type" {
80+
type = string
81+
default = "ultrawarm1.medium.elasticsearch"
82+
description = "Type of UltraWarm nodes"
83+
}
84+
6785
variable "iam_role_arns" {
6886
type = list(string)
6987
default = []
@@ -273,3 +291,33 @@ variable "kibana_hostname_enabled" {
273291
description = "Explicit flag to enable creating a DNS hostname for Kibana. If `true`, then `var.dns_zone_id` is required."
274292
default = false
275293
}
294+
295+
variable "advanced_security_options_enabled" {
296+
type = bool
297+
default = false
298+
description = "AWS Elasticsearch Kibana enchanced security plugin enabling (forces new resource)"
299+
}
300+
301+
variable "advanced_security_options_internal_user_database_enabled" {
302+
type = bool
303+
default = false
304+
description = "Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin"
305+
}
306+
307+
variable "advanced_security_options_master_user_arn" {
308+
type = string
309+
default = ""
310+
description = "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)"
311+
}
312+
313+
variable "advanced_security_options_master_user_name" {
314+
type = string
315+
default = ""
316+
description = "Master user username (applicable if advanced_security_options_internal_user_database_enabled set to true)"
317+
}
318+
319+
variable "advanced_security_options_master_user_password" {
320+
type = string
321+
default = ""
322+
description = "Master user password (applicable if advanced_security_options_internal_user_database_enabled set to true)"
323+
}

0 commit comments

Comments
 (0)