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"
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
}
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![image](https://github.com/site24x7/terraform-provider-site24x7/assets/89018369/c11f9599-8426-48d4-8777-71914bd83084)
what it currently sets![image](https://github.com/site24x7/terraform-provider-site24x7/assets/89018369/16c3851a-3a4f-4e6a-90b8-0e8a31aedb00)