fix: Ensure that custom KMS key is not created if encryption is not enabled, support computed values in cluster name (#2328)

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
Resolves undefined
Resolved undefined
Closes undefined
This commit is contained in:
Carlos Santana
2022-12-07 11:05:49 -05:00
committed by GitHub
parent c0423efb94
commit b83f6d98bf
4 changed files with 26 additions and 8 deletions

View File

@@ -300,7 +300,7 @@ resource "aws_launch_template" "this" {
################################################################################
locals {
launch_template_id = var.create && var.create_launch_template ? aws_launch_template.this[0].id : var.launch_template_id
launch_template_id = var.create && var.create_launch_template ? try(aws_launch_template.this[0].id, null) : var.launch_template_id
# Change order to allow users to set version priority before using defaults
launch_template_version = coalesce(var.launch_template_version, try(aws_launch_template.this[0].default_version, "$Default"))
}