You can manage SigNoz alert rules as reviewable, version-controlled code with the Terraform signoz provider. As of provider v0.1.0, the canonical, always-current reference for doing this lives on the Terraform Registry. The previous inline example on this page was removed to avoid drift now that the provider docs are generated directly from the provider schema.
What changed in v0.1.0
Provider v0.1.0 is a breaking change for alerts:
- The
signoz_alertresource was removed. Use the newsignoz_ruleresource instead. signoz_ruleis built on the SigNoz v2 rules API (/api/v2/rules) and usesschema_version = "v2alpha1", so every field is a typed, first-class attribute that Terraform validates at plan time (instead of opaquejsonencode(...)strings).signoz_rulerequires SigNoz v0.133.0 or newer.
If you currently manage alerts with signoz_alert, follow the migration guide below before upgrading to v0.1.0.
Reference
- Rule resource reference: signoz_rule resource
- Provider configuration and getting started: SigNoz provider docs
- Migrating from
signoz_alerttosignoz_rule: Alert-to-rule migration guide - Upgrading the provider from 0.0.x to 0.1.0: v0.0.x → v0.1.0 migration guide
You can also create and edit alerts from the SigNoz UI.