Skip to content

kupe_alertmanager_global

Manages the global section of the notification settings for a tenant. Define this resource once per tenant.

resource "kupe_alertmanager_global" "main" {
body_json = jsonencode({
smtp_from = "alerts@example.com"
smtp_smarthost = "smtp.example.com:587"
smtp_auth_username = "alerts@example.com"
smtp_auth_password = var.smtp_password
resolve_timeout = "5m"
})
}
variable "smtp_password" {
type = string
sensitive = true
}
  • body_json (String, Sensitive) notification defaults as a JSON document. Use HCL’s jsonencode() to author. See the linked configuration reference for the field list. Marked sensitive because global config commonly includes SMTP credentials, OAuth secrets, and webhook tokens; the value is still stored in plaintext in your Terraform state, so back the state with an encrypted remote backend.
  • etag (String) Wrapper ETag from the most recent read or write. Used for optimistic locking.
  • id (String) Always equal to the singleton constant alertmanager-global. Singleton-per-tenant resource.

Import is supported using the following syntax:

The terraform import command can be used, for example:

Terminal window
terraform import kupe_alertmanager_global.main alertmanager-global