Skip to main content
The Superlog provider manages alerts, dashboards, and synthetic checks as code. It works with Terraform and OpenTofu.

Configure the provider

Create the key under Settings → API keys. See API keys. The provider acts as the member who created the key, in that key’s workspace. Set endpoint to the region your workspace is in: https://superlog.sh for EU or https://us.superlog.sh for US.

Resources and data sources

Two behaviors to know:
  • superlog_dashboard owns all of its widgets. Widgets added in Superlog are removed on the next apply.
  • superlog_synthetic_check stores secret_headers encrypted, and Superlog never returns their values. Changes made to them outside Terraform are not detected.
Every resource has a read-only url that links to the object in Superlog. Import an existing object by the ID from its URL, for example terraform import superlog_alert.checkout_errors <alert-id>.

Example: an alert that posts to Slack

This alert fires when checkout logs more than 50 errors in production in 5 minutes, and posts to #alerts. Connect Slack first. The channel must be public, or private with the Superlog app in it.
While the value is past the threshold, the alert posts once to the channel and posts the recovery in the same thread. Without slack, the alert only records its history in Superlog. If more than one connected Slack workspace has a channel with that name, set workspace on the data source to the Slack workspace’s name. Alert defaults: window_minutes is 5, evaluation_interval_seconds is 60, group_mode is single, and enabled is true. To check each service separately, set group_mode = "per_group" and group_by = "service.name".

Export existing configuration

Superlog can write Terraform for objects you already have. The output has an import block for each one, so terraform apply adopts the existing objects instead of creating copies.
  • One object: click Copy as Terraform on an alert, dashboard, or synthetic check page.
  • The whole workspace: call GET /terraform on the management API.
  • From an agent: call the export_terraform tool on the MCP server.
Without parameters, the export includes every alert, dashboard, and synthetic check. To export only some, pass alertIds, dashboardIds, or syntheticCheckIds as comma-separated IDs. Secret header values of synthetic checks become sensitive variables for you to set.