Skip to content

Commit 5d4d25f

Browse files
nilpntrkayman-mk
andauthored
chore: update kms settings for launch template to allow default kms (#1349)
## Description Fix for change in `kms_key_id` validation on the launch template ebs volumes. This was implemented on the aws provider 6.16.0 https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#6160-october-9-2025. When using the default ebs kms key, it will now no longer complain about the empty "" provided to the `kms_key_id` for ebs volumes with encryption enabled. > Error: "block_device_mappings.0.ebs.0.kms_key_id" cannot be shorter than 1 character > > with module.runner.aws_launch_template.this[0], > on .terraform/modules/runner/docker_machine_fleet.tf line 42, in resource "aws_launch_template" "this": > 41: kms_key_id = local.kms_key_arn > Closes #1348 Basically duplicate of #1343 but for docker_machine_fleet instead of docker_autoscaler. Co-authored-by: Matthias Kay <[email protected]>
1 parent b65acc4 commit 5d4d25f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker_machine_fleet.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ resource "aws_launch_template" "fleet_gitlab_runner" {
3939
iops = contains(["gp3", "io1", "io2"], var.runner_worker_docker_machine_instance.volume_type) ? var.runner_worker_docker_machine_instance.volume_iops : null
4040
throughput = var.runner_worker_docker_machine_instance.volume_type == "gp3" ? var.runner_worker_docker_machine_instance.volume_throughput : null
4141
encrypted = true
42-
kms_key_id = local.kms_key_arn
42+
kms_key_id = local.kms_key_arn != "" ? local.kms_key_arn : null
4343
}
4444
}
4545

0 commit comments

Comments
 (0)