devhelm_monitor resource creates and manages monitors of any type. Configure assertions, incident policies, and scheduling in HCL.
Basic example
Arguments
Top-level
| Attribute | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name (also used as import ID) |
type | string | Yes | Monitor type: HTTP, DNS, TCP, ICMP, HEARTBEAT, MCP_SERVER. Forces replacement on change. |
config | string (JSON) | Yes | Type-specific configuration as JSON |
frequency_seconds | number | — | Check frequency in seconds (30–86400) |
enabled | bool | — | Whether the monitor is active (default: true) |
regions | list(string) | — | Probe regions |
environment_id | string | — | Environment ID for variable substitution |
alert_channel_ids | list(string) | — | Alert channel IDs to notify |
tag_ids | list(string) | — | Tag IDs to attach |
auth | string (JSON) | — | Authentication configuration as JSON (sensitive) |
Computed attributes
| Attribute | Description |
|---|---|
id | Monitor ID |
ping_url | Heartbeat ping URL (only set for HEARTBEAT type) |
assertion block
Repeatable block for pass/fail criteria:| Attribute | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Assertion type (e.g., StatusCodeAssertion, ResponseTimeAssertion) |
config | string (JSON) | Yes | Assertion configuration as JSON |
severity | string | — | fail or warn (default: fail) |
incident_policy block
At most one block. Controls trigger, confirmation, and recovery behavior:| Attribute | Type | Required | Description |
|---|---|---|---|
confirmation_type | string | Yes | Confirmation strategy (e.g., multi_region) |
min_regions_failing | number | — | Minimum failing regions to confirm |
max_wait_seconds | number | — | Maximum confirmation wait time |
consecutive_successes | number | — | Consecutive passes required for recovery |
min_regions_passing | number | — | Minimum passing regions for recovery |
cooldown_minutes | number | — | Minutes before auto-resolving |
incident_policy):
| Attribute | Type | Required | Description |
|---|---|---|---|
type | string | Yes | consecutive_failures, failures_in_window, or response_time |
severity | string | Yes | down or degraded |
scope | string | — | per_region or any_region |
count | number | — | Failure count threshold |
window_minutes | number | — | Time window for failures_in_window |
threshold_ms | number | — | Response time threshold |
aggregation_type | string | — | all_exceed, average, p95, max |
Config by monitor type
Theconfig attribute accepts JSON. The shape depends on type:
Full example with assertions and incident policy
Import
Next steps
Alert channels
devhelm_alert_channel resource reference.
Tags
devhelm_tag resource reference.
Data sources
Reference existing resources without managing them.