Skip to main content
The devhelm_monitor resource creates and manages monitors of any type. Configure assertions, incident policies, and scheduling in HCL.

Basic example

JSON value types inside config and assertions[].config must match the API contract exactly — status_code.expected is a string (expected = "200", not expected = 200), while response_time.thresholdMs is a number. Type-mismatched values plan cleanly but fail apply with “Provider produced inconsistent result” because the API normalizes them on the round-trip.

Arguments

Top-level

Computed attributes

assertions block

Repeatable block for pass/fail criteria. The block name is assertions (plural); repeat it once per assertion:

incident_policy attribute

Single nested attribute (use = assignment, not a block) controlling confirmation and recovery behavior. Omit it entirely to adopt server defaults; supplying any field overrides the policy in full. trigger_rules[*] object: The provider enforces these conditional requirements at plan time.

Config by monitor type

The config attribute accepts JSON. The shape depends on type:

Full example with assertions and incident policy

Import

Import accepts the monitor name or its UUID. If multiple monitors share the same name, the import fails with an ambiguity error listing the candidate UUIDs — import by UUID in that case.

Next steps

Alert channels

devhelm_alert_channel resource reference.

Tags

devhelm_tag resource reference.

Data sources

Reference existing resources without managing them.