Skip to content

Commit 3795811

Browse files
russkimax-rocket-internet
authored andcommitted
Adding workers_launch_template ebs encryption (#292)
* Adding workers_launch_template ebs encryption * Update CHANGELOG.md
1 parent bb9c1b0 commit 3795811

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Added
1313

14+
- Adding ebs encryption for workers launched using workers_launch_template (by @russki)
1415
- Added output for generated kubeconfig filename (by @syst0m)
1516
- Added outputs for cluster role ARN and name (by @spingel)
1617
- Added optional name filter variable to be able to pin worker AMI to a release (by @max-rocket-internet)

local.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ locals {
6262
root_volume_size = "100" # root volume size of workers instances.
6363
root_volume_type = "gp2" # root volume type of workers instances, can be 'standard', 'gp2', or 'io1'
6464
root_iops = "0" # The amount of provisioned IOPS. This must be set with a volume_type of "io1".
65+
root_encrypted = false # root volume encryption for workers.
66+
kms_key_id = "" # KMS key ID used for encrypted block device. ASG must have access to this key. If not specified, the default KMS key will be used.
6567
key_name = "" # The key name that should be used for the instances in the autoscaling group
6668
pre_userdata = "" # userdata to pre-append to the default userdata.
6769
additional_userdata = "" # userdata to append to the default userdata.

workers_launch_template.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ resource "aws_launch_template" "workers_launch_template" {
9696
volume_size = "${lookup(var.worker_groups_launch_template[count.index], "root_volume_size", local.workers_group_launch_template_defaults["root_volume_size"])}"
9797
volume_type = "${lookup(var.worker_groups_launch_template[count.index], "root_volume_type", local.workers_group_launch_template_defaults["root_volume_type"])}"
9898
iops = "${lookup(var.worker_groups_launch_template[count.index], "root_iops", local.workers_group_launch_template_defaults["root_iops"])}"
99+
encrypted = "${lookup(var.worker_groups_launch_template[count.index], "root_encrypted", local.workers_group_launch_template_defaults["root_encrypted"])}"
100+
kms_key_id = "${lookup(var.worker_groups_launch_template[count.index], "kms_key_id", local.workers_group_launch_template_defaults["kms_key_id"])}"
99101
delete_on_termination = true
100102
}
101103
}

0 commit comments

Comments
 (0)