Skip to content

Commit

Permalink
feat: Add name postfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Karina5005 committed Nov 7, 2023
1 parent 705ecd5 commit 133e39d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
locals {
name = var.name_postfix == null ? var.topic_name : format("%s-%s", var.topic_name, var.name_postfix)
}

resource "huaweicloud_smn_topic" "topic" {
name = var.topic_name
}
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ variable "topic_name" {
type = string
}


variable "name_postfix" {
description = "Name Postfix"
type = string
default = null
}

variable "emails" {
description = "Specifies the subscriptions emails"
type = list(string)
Expand Down

0 comments on commit 133e39d

Please sign in to comment.