Integration · Developers

Monitors as code with Terraform

Keep monitors, projects, alert channels and status pages in Terraform next to the infrastructure they watch, and see every change in a plan before it is applied.

14-day free trial · Then free on 20 monitors · No credit card

What you get

  • Every monitor type

    Websites and APIs, ports, ping, DNS, domain expiry, cron jobs, servers, third-party services, site health scans and flows, each with its settings as JSON, as in the API reference.

  • A client in one configuration

    A client’s project, its alert channels, its monitors and a status page that shows them, created together and referenced by ID.

  • Only what you write

    Terraform manages the monitor settings you write. The app’s defaults for the rest never show up as changes in a plan.

  • Import what exists

    Bring monitors, projects, alert channels and status pages made in the app under Terraform with terraform import and their ID.

How to connect Terraform

  1. Create an API key under Settings › API with Read & write access.

  2. Add uptimecheck-com/uptimecheck to required_providers and run terraform init.

  3. Set the key in the UPTIMECHECK_API_KEY environment variable, so it stays out of your configuration.

  4. Add an uptimecheck_monitor resource, run terraform plan and then terraform apply.

SMS, Telegram, push and Add to Slack channels are set up in the app; read them with the uptimecheck_alert_channels data source. Every resource is documented in the Terraform Registry.

On Professional and Business, with a read & write API key from Settings › API.

What it can do

  • uptimecheck_monitor
  • uptimecheck_project
  • uptimecheck_alert_channel
  • uptimecheck_status_page
  • uptimecheck_alert_channels
  • uptimecheck_projects
  • uptimecheck_status_pages

Resources in blue are created and changed by Terraform; the others are data sources it reads.

main.tf

terraform {
  required_providers {
    uptimecheck = {
      source = "uptimecheck-com/uptimecheck"
    }
  }
}

# The API key comes from UPTIMECHECK_API_KEY.
provider "uptimecheck" {}

resource "uptimecheck_monitor" "checkout" {
  type             = "http"
  name             = "Checkout"
  target           = "https://northwind.shop/checkout"
  interval_seconds = 60
  config = jsonencode({
    expectedStatus = "200-299"
    keyword        = { value = "Add to cart", mode = "contains" }
  })
}
A provider block and one website monitor. config takes the monitor type’s settings as JSON, with the same keys as the API.

Questions

Where is the Terraform provider published?

In the Terraform Registry as uptimecheck-com/uptimecheck, with signed releases. Add it to required_providers, and terraform init downloads it.

What can I manage with it?

Monitors of every type, projects, alert channels and status pages with their components. Data sources list your alert channels, projects and status pages.

Which alert channels can Terraform create?

Email, Slack by incoming webhook, Microsoft Teams, Discord, Google Chat, Mattermost, PagerDuty, ntfy, Pushover and webhooks. SMS, Telegram, push and Add to Slack are set up in the app and read with the uptimecheck_alert_channels data source.

Can I bring existing monitors under Terraform?

Yes. Import a monitor with terraform import and its ID, such as terraform import uptimecheck_monitor.checkout mon_…. Projects, alert channels and status pages are imported the same way.

Is anything left to the app?

A status page’s password, its email access list and custom CSS are set in the app, and Terraform leaves them alone. A webhook channel’s signing secret is returned once, when Terraform creates the channel.

Which plans include it?

Professional and Business, like the REST API. The provider needs a read & write API key, best set in the UPTIMECHECK_API_KEY environment variable.

Hear it from us, not your customers.

Click around the live demo without an account, or start your trial and add your first monitor.

14-day free trial · Then free on 20 monitors · No credit card