Terraform
Manage your monitors and notification channels as code with the official
Terraform provider,
uptimepage/uptimepage.
The Terraform Registry page is the full reference — every resource, attribute, and data source, regenerated from the provider on each release. This page is a quick start; it links out rather than duplicating that reference.
Quick start
terraform {
required_providers {
uptimepage = {
source = "uptimepage/uptimepage"
}
}
}
provider "uptimepage" {
token = var.uptimepage_token # or set UPTIMEPAGE_TOKEN
org = "your-org-slug" # or set UPTIMEPAGE_ORG
# endpoint defaults to https://app.uptimepage.dev; set it for a self-hosted instance
}
resource "uptimepage_target" "api" {
name = "api prod"
interval = 60
check = {
type = "http"
http = {
url = "https://example.com/healthz"
expected_status = { kind = "exact", exact = 200 }
}
}
}
Credentials
- Token — create one at Settings → API tokens (
/settings/api-tokens; requires a verified email). Supply it via thetokenattribute or theUPTIMEPAGE_TOKENenvironment variable. The full token is shown once. Grant the least scope the provider needs:targets:write+channels:writecovers both managed resources (writeimpliesread, and Terraform only deletes duringterraform destroy). Addtargets:delete+channels:deleteonly if you rundestroy. For defence in depth, bind the token to the org you manage so a leak can’t reach your other orgs. - Org — API tokens are user-scoped, so every request must name an
organization. Set
org(the org slug) orUPTIMEPAGE_ORG; it is sent as theX-Uptimepage-Orgheader. Without it the API returns400 ORG_REQUIRED. Find your slug fromGET /api/v1/orgsor your dashboard URL. A token bound to an org requiresorgto match it (else403 ORG_HEADER_MISMATCH). - Endpoint — defaults to the hosted API at
https://app.uptimepage.dev. For a self-hosted instance, setendpointto your host (the apex marketing domain does not serve/api/v1).
Resources & data sources
| Name | Kind | Manages |
|---|---|---|
uptimepage_target | resource | Monitors — http, tcp, tls_cert, domain_expiry, dns checks |
uptimepage_notification_channel | resource | Alert destinations — webhook, slack, telegram, whatsapp. The pagerduty/ntfy/pushover/sms kinds land in a provider release after the API ships them. The one-tap telegram_app and whatsapp_app kinds are not manageable: their configs are minted by the link flows and the API rejects them in request bodies (CHANNEL_KIND_MANAGED) |
uptimepage_target | data source | Look up an existing target by id |
For the full attribute reference and an example per check type, see the provider docs on the Terraform Registry.
Managed-by badge
Resources the provider creates or updates carry a terraform source marker
(the provider identifies itself on every request). The web UI shows a small
terraform chip next to those monitors and channels, plus a banner on the
monitor detail page, so anyone browsing knows the resource is managed as code.
The marker is informational — the UI does not lock the resource. But an edit
made in the UI flips its badge to ui and will be overwritten the next time
you run terraform apply, since your .tf files remain the source of truth.
Change managed resources in Terraform, not the UI.
Source
Provider source and issue tracker: https://github.com/uptimepage/terraform-provider-uptimepage.