Skip to content

Commit

Permalink
fix: PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Karina5005 committed Nov 8, 2023
1 parent 788cb0c commit d9de2d8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ locals {
resource "huaweicloud_lts_notification_template" "test" {
name = var.name
source = "LTS"
locale = "en-us"
locale = var.locale

templates {
sub_type = "email"
sub_type = var.sub_type
content = var.content
}
}
22 changes: 21 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "name" {
description = "Specifies the name of the keywords alarm rule"
description = "Specifies the name of the template"
type = string
}

Expand All @@ -12,4 +12,24 @@ variable "name_postfix" {
variable "content" {
description = "Content of template"
type = string
}

variable "locale" {
description = "Language"
type = string
default = "en-us"
validation {
condition = contains(["zh-cn", "en-us"], var.locale)
error_message = "Locale is not one of: zh-cn, en-us"
}
}

variable "sub_type" {
description = "Type of the template"
type = string
default = "email"
validation {
condition = contains(["sms", "dingding", "wechat", "webhook", "email"], var.sub_type)
error_message = "Type of template is not one of: sms, dingding, wechat, webhook, email"
}
}

0 comments on commit d9de2d8

Please sign in to comment.