---
title: "Terraform & OpenTofu"
description: "Manage monitors, incident management, status pages and users as code with the Uptimeify provider for OpenTofu and Terraform."
---

Your monitoring, defined in code. Monitors, incident management, status pages and users live next to the infrastructure they watch, go through the same pull request review and roll out the same way for every customer. Drift shows up in the next `plan`, not in the next outage.

The provider `uptimeify/uptimeify` works with **OpenTofu 1.11+** and **Terraform 1.11+**. Every resource is acceptance-tested against a real Uptimeify instance.

<Cards>
  <Card title="Getting started" href="/terraform/getting-started">Install the provider and create your first monitor.</Card>
  <Card title="Customer tokens" href="/terraform/customer-tokens">One configuration per client, scoped by its own token.</Card>
  <Card title="Import existing setup" href="/terraform/import">Bring monitors you created in the dashboard under code.</Card>
  <Card title="Secrets and updates" href="/terraform/secrets-and-updates">Write-only attributes, package limits and how updates are sent.</Card>
</Cards>

## Install

```terraform
terraform {
  required_version = ">= 1.11"
  required_providers {
    uptimeify = {
      source  = "uptimeify/uptimeify"
      version = "~> 0.2"
    }
  }
}

# endpoint and api_token fall back to UPTIMEIFY_ENDPOINT and UPTIMEIFY_API_TOKEN.
provider "uptimeify" {}
```

The provider is published in the [OpenTofu registry](https://search.opentofu.org/provider/uptimeify/uptimeify/latest) and the [Terraform registry](https://registry.terraform.io/providers/Uptimeify/uptimeify/latest) under the same address.

## Provider configuration

| Argument | Environment variable | Default |
| --- | --- | --- |
| `api_token` (String, Sensitive) | `UPTIMEIFY_API_TOKEN` | none, required |
| `endpoint` (String) | `UPTIMEIFY_ENDPOINT` | `https://uptimeify.io` |

`api_token` is an organization API token or a customer token, both start with `wsm_`. Create one in the dashboard under **Settings > API**, see [Generate an API token](/api/introduction/generate-api-token) and [Token scopes](/api/introduction/token-scopes-organization-vs-customer). Keep it in the environment or a secret store, not in the configuration.

## What you can manage

Everything the Uptimeify API allows an API token to change. All names carry the `uptimeify_` prefix.

| Area | Resources |
| --- | --- |
| Monitors | [`website`](/terraform/resources/website) (HTTP and heartbeat), [`dns_monitor`](/terraform/resources/dns_monitor), [`tcp_monitor`](/terraform/resources/tcp_monitor), [`icmp_monitor`](/terraform/resources/icmp_monitor), [`smtp_monitor`](/terraform/resources/smtp_monitor), [`ssh_monitor`](/terraform/resources/ssh_monitor), [`ftp_monitor`](/terraform/resources/ftp_monitor), [`imap_pop_monitor`](/terraform/resources/imap_pop_monitor) |
| Organizing | [`tag`](/terraform/resources/tag), [`monitor_tag`](/terraform/resources/monitor_tag), [`custom_field`](/terraform/resources/custom_field), [`maintenance_window`](/terraform/resources/maintenance_window) |
| Alerting | [`notification_channel`](/terraform/resources/notification_channel), [`escalation_config`](/terraform/resources/escalation_config) |
| Customers | [`customer`](/terraform/resources/customer), [`customer_ip`](/terraform/resources/customer_ip), [`customer_domain`](/terraform/resources/customer_domain) |
| Incident management | [`im_team`](/terraform/resources/im_team), [`im_team_member`](/terraform/resources/im_team_member), [`im_escalation_tier`](/terraform/resources/im_escalation_tier), [`im_schedule`](/terraform/resources/im_schedule), [`im_schedule_override`](/terraform/resources/im_schedule_override), [`im_team_override`](/terraform/resources/im_team_override), [`im_alert_source`](/terraform/resources/im_alert_source), [`im_routing_rule`](/terraform/resources/im_routing_rule), [`im_channel`](/terraform/resources/im_channel), [`im_outbound_integration`](/terraform/resources/im_outbound_integration), [`im_statuspage_rule`](/terraform/resources/im_statuspage_rule), [`im_org_settings`](/terraform/resources/im_org_settings), [`user_notification_settings`](/terraform/resources/user_notification_settings), [`notification_template`](/terraform/resources/notification_template) |
| Status pages | [`status_page`](/terraform/resources/status_page), [`status_page_design`](/terraform/resources/status_page_design), [`status_page_audience_groups`](/terraform/resources/status_page_audience_groups), [`status_page_component`](/terraform/resources/status_page_component), [`status_page_component_group`](/terraform/resources/status_page_component_group), [`status_page_maintenance`](/terraform/resources/status_page_maintenance), [`status_page_domain`](/terraform/resources/status_page_domain), [`status_page_domain_activation`](/terraform/resources/status_page_domain_activation) |
| Organization | [`organization_settings`](/terraform/resources/organization_settings), [`organization_branding`](/terraform/resources/organization_branding), [`whitelabel_domain`](/terraform/resources/whitelabel_domain), [`report`](/terraform/resources/report), [`smtp_settings`](/terraform/resources/smtp_settings), [`user`](/terraform/resources/user), [`sso_oidc`](/terraform/resources/sso_oidc), [`sso_domain_verification`](/terraform/resources/sso_domain_verification) |

Data sources read monitors and the lookups you need to wire things together, for example [`uptimeify_customer`](/terraform/data-sources/customer) and [`uptimeify_im_team`](/terraform/data-sources/im_team) by name, [`uptimeify_im_on_call`](/terraform/data-sources/im_on_call), [`uptimeify_monitoring_locations`](/terraform/data-sources/monitoring_locations) and [`uptimeify_package_configs`](/terraform/data-sources/package_configs).

<Callout type="warn">`apply` and `destroy` act for real. `uptimeify_user` sends the invitation email on create and deletes the user on destroy.</Callout>

Not available through any API token, and therefore not in the provider: API tokens themselves, personal notification settings, the organization's MFA policy and the SMS overage limit.

## Errors

The provider passes the API's error through unchanged, including the machine-readable code and the request id, for example:

```text
uptimeify API: HTTP 400 checkKeywordEnabled requires searchTerm (code checkRequiresValue) [requestId 0e8f8f12-...]
```

The codes are listed in [Error codes and known pitfalls](/api/error-codes-and-known-pitfalls). Quote the request id when you contact support.

## Support

Questions and feature requests: [hello@uptimeify.io](mailto:hello@uptimeify.io). The provider is open source under MPL-2.0.
