StatusPage.me Help Center

Popular topics: creating a status page, connecting monitors, automatic incidents, custom domains, integrations and billing.

StatusPage.me Jul 23, 2026 Embeds & Integrations

Terraform Provider: Getting Started

The Terraform provider for StatusPage.me, maintained by the StatusPage.me team, lets you manage status pages, monitors, immutable incidents and timeline updates, maintenance windows, and live metrics as code.

Incident timeline updates and guarded incident archival require provider version 0.1.1 or later.

Requirements

  • Terraform CLI
  • A StatusPage.me account
  • An API key with the scopes required by the resources you manage

The provider is hosted on the public Terraform Registry as hosted-status-page/hsp. It connects only to the hosted StatusPage.me API; there is no self-hosted endpoint to configure.

Create an API key

Create an API key in the API Console. Give it only the scopes your configuration needs:

ResourceRequired scopes
Status pagesstatus-pages:read, status-pages:write
Monitorsmonitors:read, monitors:write
Incidentsincidents:read, incidents:write
Maintenance windowsmaintenances:read, maintenances:write
Metricsstatus-pages:read, metrics:write

Store the key as HSP_API_KEY in your shell or CI secret manager. Do not commit it to a .tf file.

Configure the provider

Create statuspage.tf:

terraform {
  required_providers {
    hsp = {
      source  = "hosted-status-page/hsp"
      version = "~> 0.1.0"
    }
  }
}

provider "hsp" {}

Then run:

export HSP_API_KEY=spk_...
terraform init

You can set api_key in the provider block instead, but an environment variable is the safer default for local development and CI.

Create a status page and monitor

resource "hsp_status_page" "app" {
  name = "Example Status Page"
  slug = "example"
}

resource "hsp_monitor" "website" {
  status_page_id = hsp_status_page.app.id
  name           = "Website"
  target         = "https://example.com"
}

Review the result before changing your account:

terraform plan
terraform apply

Next steps

Was this article helpful?