Terraform Provider

Manage your Hyperping monitors, status pages, incidents, healthchecks, and maintenance windows as Terraform resources.

Maintained by Hyperping, built on the provider created by Develeap. Published on the Terraform Registry as hyperping/hyperping. Source code on GitHub.

Prerequisites

  • Terraform 1.11 or later
  • A Hyperping account with an API token (generate one from Settings → API, see API authentication)

Installation

  1. Add the provider to your Terraform configuration
    terraform {
      required_providers {
        hyperping = {
          source  = "hyperping/hyperping"
          version = "~> 2.1"
        }
      }
    }
    
    provider "hyperping" {
      api_key = var.hyperping_api_key
    }
  2. Initialize your workspace

    Run terraform init to download the provider.

Supported resources

ResourceDescription
hyperping_monitorHTTP/HTTPS uptime monitors with multi-region checks
hyperping_statuspagePublic status pages with customization
hyperping_statuspage_subscriberStatus page notification subscribers (email, SMS, Teams)
hyperping_incidentIncident management with status updates
hyperping_healthcheckCron job and heartbeat monitoring
hyperping_maintenanceScheduled maintenance windows
hyperping_outageOutage tracking and management

Example: create a monitor

resource "hyperping_monitor" "api" {
  name                 = "API Health Check"
  url                  = "https://api.example.com/health"
  protocol             = "http"
  check_frequency      = 60
  expected_status_code = "200"
  regions              = ["london", "virginia", "singapore"]
}

resource "hyperping_statuspage" "main" {
  name      = "Service Status"
  subdomain = "status-example"
  theme     = "dark"
}

resource "hyperping_statuspage_subscriber" "team" {
  statuspage_uuid = hyperping_statuspage.main.id
  type            = "email"
  email           = "team@example.com"
}

Example: healthchecks on a status page

Reference a healthcheck with its public_id (hc_…), directly in a section or inside a group. Uptime bars are supported; response times are not, since a healthcheck has none.

Give every service a name: it is the row label on the page, and the page does not fall back to the healthcheck or monitor name.

resource "hyperping_healthcheck" "backup" {
  name               = "Nightly backup"
  period_value       = 1
  period_type        = "days"
  grace_period_value = 1
  grace_period_type  = "hours"
}

resource "hyperping_healthcheck" "etl" {
  name               = "ETL"
  cron               = "0 */6 * * *"
  timezone           = "Europe/Berlin"
  grace_period_value = 30
  grace_period_type  = "minutes"
}

resource "hyperping_statuspage" "internal" {
  name             = "Internal status"
  hosted_subdomain = "internal-status"

  settings = {
    name      = "Internal status"
    languages = ["en"]
  }

  sections = [
    {
      name     = { en = "Scheduled jobs" }
      is_split = true
      services = [
        # A healthcheck goes by its public id (hc_), never by id (the ping token).
        {
          uuid        = hyperping_healthcheck.backup.public_id
          name        = { en = "Nightly backup" }
          show_uptime = true
        },
        # A group of services, with its own header.
        {
          is_group = true
          name     = { en = "Data pipelines" }
          services = [
            {
              uuid        = hyperping_healthcheck.etl.public_id
              name        = { en = "ETL" }
              show_uptime = true
            },
          ]
        },
      ]
    },
  ]
}

Each service of a status page also exposes a read-only type: monitor, healthcheck, server or component.

Migrating from develeap/hyperping

Version 2.1.0 of hyperping/hyperping continues develeap/hyperping 2.0.0 with the same resources and the same state format, so nothing is recreated.

  1. Change the provider source
    terraform {
      required_providers {
        hyperping = {
          source  = "hyperping/hyperping" # was "develeap/hyperping"
          version = "~> 2.1"
        }
      }
    }
  2. Move the state and check the plan
    terraform state replace-provider \
      registry.terraform.io/develeap/hyperping \
      registry.terraform.io/hyperping/hyperping
    
    terraform init -upgrade
    terraform plan   # expected: No changes

    Run it once per workspace or state. The plan should show no changes. If you were still on a 1.x version of develeap/hyperping, read its 2.0.0 notes first: some secret attributes became write-only and need Terraform 1.11.

Import existing resources

You can import resources you already created in the Hyperping dashboard:

terraform import hyperping_monitor.api <monitor-id>

Find resource IDs in the Hyperping dashboard URL or via the List Monitors API.

Links

Next steps