I would like to have a hyperlink to this monitor on PagerDuty.
I have tried to do in this way, but it does not work. The system told me that there’s a cycle.
Shortcut: https://app.datadoghq.com/monitors/${datadog_monitor.monitor_1234[each.key].id}
resource "datadog_monitor" "monitor_1234" {
for_each = {
for entry in local.dcs_list: "${entry.wave}_${entry.dc}" => entry
}
name = "[${each.value.dc} | ${each.value.wave}] monitor_name"
priority = 1
type = "query alert"
query = "a valid query."
message = <<-EOT
Shortcut: https://app.datadoghq.com/monitors/<This_Monitor_id?>
EOT
notify_audit = false
locked = true
timeout_h = 0
include_tags = true
no_data_timeframe = 140
require_full_window = false
new_host_delay = 300
notify_no_data = true
renotify_interval = 0
escalation_message = ""
monitor_thresholds {
critical = 0
}
}