terraform-provider-site24x7
terraform-provider-site24x7 copied to clipboard
Cron Threshold - issues setting variable
Hi team, we have code to setup a threshold monitor for cron but the value never seems to set. Can anyone see any issues
This is our code.
module "threshold_profile_us_cron_50m" { source = "./payroc/threshold_profiles/threshold_profile_cron" // (Required) Name of the profile profile_name = "IAC - THRESHOLD - 50mCRON" // (Required) Type of the profile - Denotes monitor type (eg) RESTAPI, SSL_CERT type = "CRON"
cron_duration_alert = { comparison_operator = 1 trouble = 3000 strategy = 1 polls_check = 1 }
cron_no_run_alert = { severity = 0 strategy = 1 value = true polls_check = 5 }
}
This is our module code main.tf
resource "site24x7_threshold_profile" "cron_threshold_profile_us" { // (Required) Name of the profile profile_name = var.profile_name // (Required) Type of the profile - Denotes monitor type (eg) RESTAPI, SSL_CERT type = var.type // (Optional) Threshold profile types - https://www.site24x7.com/help/api/#threshold_profile_types // 1 - Static Threshold, 2 - AI-based Threshold profile_type = var.profile_type cron_no_run_alert = var.cron_no_run_alert cron_duration_alert = var.cron_duration_alert
}
our varibales.tf
CRON variables
variable "profile_name" { type = string description = "The Threshold name - lowercase" } variable "type" { type = string description = "The type of threshold profile url smtp ips port" }
variable "profile_type" { type = number description = "Static Threshold(1) or AI-based Threshold(2)" default = 1 }
variable "cron_no_run_alert" { type = map(string) description = "(Optional) ." default = null }
variable "cron_duration_alert" { type = map(string) description = "(Optional) ." default = null }
what i want to set
what it currently sets