Skip to content

Commit

Permalink
Fix kms default and function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ic3w0lf committed Sep 22, 2023
1 parent 3d06889 commit a46621e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
resource "aws_sns_topic" "main" {
name = var.name
kms_master_key_id = var.enable_sns_sse_encryption ? coalesce(var.sns_kms_master_key_id, module.kms[0].key_id) : null
kms_master_key_id = var.enable_sns_sse_encryption ? try(var.sns_kms_master_key_id, module.kms[0].key_id) : null

tags = var.tags
}
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ variable "enable_sns_sse_encryption" {
}

variable "sns_kms_master_key_id" {
default = null
description = "KMS Key ID for Server-Side Encryption of the SNS Topic. If no key is provided, a new one will be created."
default = "alias/aws/sns"
description = "KMS Key ID for Server-Side Encryption of the SNS Topic."
type = string
}

0 comments on commit a46621e

Please sign in to comment.