Skip to content

Commit

Permalink
Allow kms to receive a custom alias name
Browse files Browse the repository at this point in the history
When setting up the telemetry module for multiple environments, a new
kms_alias is created for SNS, but it's not possible to create multiple
aliases with the same name. This allows to have a custom name.
  • Loading branch information
clarissalimab committed Jul 27, 2023
1 parent 347d71e commit 360cb51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/telemetry/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module "sns_topics" {
"${source}-${severity}"
]
])

kms_alias_name = var.kms_alias_name
}

module "prometheus_workspace" {
Expand Down
5 changes: 5 additions & 0 deletions aws/telemetry/modules/sns-topics/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ variable "sns_topic_names" {
type = list(string)
}

variable "kms_alias_name" {
description = "KMS alias name for SNS topics"
type = string
}

variable "tags" {
description = "Tags to be applied to created resources"
type = map(string)
Expand Down
6 changes: 6 additions & 0 deletions aws/telemetry/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ variable "tags" {
type = map(string)
default = {}
}

variable "kms_alias_name" {
description = "KMS alias name for SNS topics"
type = string
default = "alias/sns-alarm-topics"
}

0 comments on commit 360cb51

Please sign in to comment.