Skip to content

Commit fbf50d8

Browse files
author
Sohan Yadav
authored
Merge pull request #10 from clouddrove/bridgecrew
enabled encyption at rest
2 parents 9c47f71 + f8d15f2 commit fbf50d8

File tree

4 files changed

+16
-25
lines changed

4 files changed

+16
-25
lines changed

_example/multi-node/example.tf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,19 @@ module "elasticsearch" {
5555
security_group_ids = [module.security_group.security_group_ids]
5656
subnet_ids = tolist(module.public_subnets.public_subnet_id)
5757
zone_awareness_enabled = true
58-
encrypt_at_rest_enabled = false
5958
availability_zone_count = 2
6059
elasticsearch_version = "7.1"
6160
instance_type = "t2.small.elasticsearch"
6261
instance_count = 2
6362
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
6463
volume_size = 30
6564
volume_type = "gp2"
66-
67-
dns_enabled = false
68-
es_hostname = "es"
69-
kibana_hostname = "kibana"
70-
dns_zone_id = false
65+
dns_enabled = false
66+
es_hostname = "es"
67+
kibana_hostname = "kibana"
68+
dns_zone_id = false
7169

7270
advanced_options = {
7371
"rest.action.multi.allow_explicit_index" = "true"
7472
}
75-
}
73+
}

_example/single-node/example.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,13 @@ module "elasticsearch" {
6565
log_publishing_search_cloudwatch_log_group_arn = true
6666
log_publishing_index_cloudwatch_log_group_arn = true
6767

68-
encrypt_at_rest_enabled = false
69-
enforce_https = true
70-
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
71-
public_enabled = false
72-
dns_enabled = false
73-
es_hostname = "es"
74-
kibana_hostname = "kibana"
75-
dns_zone_id = "Z1XJD7SSBKXLC1"
68+
enforce_https = true
69+
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
70+
public_enabled = false
71+
dns_enabled = false
72+
es_hostname = "es"
73+
kibana_hostname = "kibana"
74+
dns_zone_id = "Z1XJD7SSBKXLC1"
7675

7776
advanced_options = {
7877
"rest.action.multi.allow_explicit_index" = "true"

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ resource "aws_elasticsearch_domain" "default" {
153153
}
154154

155155
encrypt_at_rest {
156-
enabled = var.encrypt_at_rest_enabled
156+
enabled = true
157157
kms_key_id = var.kms_key_id
158158
}
159159

@@ -226,7 +226,7 @@ resource "aws_elasticsearch_domain" "default-public" {
226226
}
227227

228228
encrypt_at_rest {
229-
enabled = var.encrypt_at_rest_enabled
229+
enabled = true
230230
kms_key_id = var.kms_key_id
231231
}
232232

@@ -303,7 +303,7 @@ resource "aws_elasticsearch_domain" "single" {
303303
}
304304

305305
encrypt_at_rest {
306-
enabled = var.encrypt_at_rest_enabled
306+
enabled = true
307307
kms_key_id = var.kms_key_id
308308
}
309309

@@ -378,7 +378,7 @@ resource "aws_elasticsearch_domain" "single-public" {
378378
}
379379

380380
encrypt_at_rest {
381-
enabled = var.encrypt_at_rest_enabled
381+
enabled = true
382382
kms_key_id = var.kms_key_id
383383
}
384384

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@ variable "iops" {
160160
description = "The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type."
161161
}
162162

163-
variable "encrypt_at_rest_enabled" {
164-
type = bool
165-
default = true
166-
description = "Whether to enable encryption at rest."
167-
}
168-
169163
variable "kms_key_id" {
170164
type = string
171165
default = ""

0 commit comments

Comments
 (0)