Skip to content

Commit fc88de1

Browse files
committed
avoid changing sns topic name
1 parent 8162b5b commit fc88de1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

terraform/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ locals {
2222
account_id = data.aws_caller_identity.current.account_id
2323

2424
aws_resources_name = terraform.workspace == "default" ? "${var.prefix}-${var.app_name}" : "${var.prefix}-${var.app_name}-${terraform.workspace}"
25+
sns_topic_name = terraform.workspace == "default" ? "${var.app_name}-${var.prefix}" : "${var.app_name}-${var.prefix}-${terraform.workspace}"
2526

2627
default_tags = length(var.default_tags) == 0 ? {
2728
team : "TVA",

terraform/sqs_sns.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "aws_sns_topic_policy" "default" {
2121
}
2222

2323
resource "aws_sns_topic" "gibs_response_topic" {
24-
name = "svc-${local.aws_resources_name}-gibs-response-topic"
24+
name = "svc-${local.sns_topic_name}-gibs-response-topic"
2525
lifecycle {
2626
# GIBS publishes to this topic, so we want to avoid destroying it unless coordinating the change with GIBS
2727
prevent_destroy = true

0 commit comments

Comments
 (0)