Skip to content

Commit

Permalink
use try() in kms
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 24, 2022
1 parent 25dfa2f commit 2369e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/kms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# }
#
locals {
kms_key_arn = var.kms_key_arn == null ? aws_kms_key.key[0].arn : var.kms_key_arn
kms_key_arn = var.kms_key_arn == null ? try(aws_kms_key.key[0].arn, "") : var.kms_key_arn
kms_key_name = format("%s%s", local._prefixes["kms"], local.name)

kms_admin_root = [format("arn:%v:iam::%v:root", local.partition, local.account_id)]
Expand Down

0 comments on commit 2369e87

Please sign in to comment.