Skip to main content
The larmhq/larm provider lets you manage Larm with Terraform. It’s open source at github.com/larmhq/terraform-provider-larm, and the full reference for every resource is on the Terraform Registry.
The provider is pre-1.0, and the schema may change in minor releases until 1.0. Pin a minor version, as in the example below.

Set up the provider

The provider authenticates with an API key. Create a read/write key in Settings > API Keys (write keys are available on every plan) and set it as an environment variable:
You can also pass it to the provider as api_key, for example from a sensitive variable.

Resources

A monitor with an alert channel

config holds the check-type-specific settings as JSON, the same fields as in the API. Use jsonencode. Formatting differences in it don’t produce a diff.

A heartbeat monitor

For heartbeat monitors, the check interval comes from expected_interval, so don’t set interval_seconds.

A status page

components describes the whole page: groups, components inside them, and the monitors linked to each component. The provider applies the structure as one change.

A webhook subscription

Use the secret to verify webhook signatures.

Import existing resources

Resources you created in the dashboard can be brought under Terraform with their ID:
The same works for larm_alert_channel, larm_status_page and larm_webhook_subscription.