Skip to content

Commit

Permalink
pull alias name from var.
Browse files Browse the repository at this point in the history
  • Loading branch information
westonplatter committed Dec 11, 2020
1 parent badf2cb commit c0536c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ data "aws_region" "current" {}
data "aws_caller_identity" "current" {}

locals {
region = coalesce(var.region, data.aws_region.current.name)
account_id = data.aws_caller_identity.current.account_id
session_logging_kms_key_alias = var.session_logging_kms_key_alias

region = coalesce(var.region, data.aws_region.current.name)
account_id = data.aws_caller_identity.current.account_id
}

#####################
Expand Down Expand Up @@ -173,7 +171,7 @@ module "kms_key" {
description = "KMS key for encrypting Session Logs in S3 and CloudWatch."
deletion_window_in_days = 10
enable_key_rotation = true
alias = local.session_logging_kms_key_alias
alias = var.session_logging_kms_key_alias

policy = <<DOC
{
Expand Down

0 comments on commit c0536c1

Please sign in to comment.