Terraform & OpenTofu
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.
Getting started
Customer tokens
Import existing setup
Secrets and updates
Install
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 and the Terraform registry 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 and Token scopes. 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 (HTTP and heartbeat), dns_monitor, tcp_monitor, icmp_monitor, smtp_monitor, ssh_monitor, ftp_monitor, imap_pop_monitor |
| Organizing | tag, monitor_tag, custom_field, maintenance_window |
| Alerting | notification_channel, escalation_config |
| Customers | customer, customer_ip, customer_domain |
| Incident management | im_team, im_team_member, im_escalation_tier, im_schedule, im_schedule_override, im_team_override, im_alert_source, im_routing_rule, im_channel, im_outbound_integration, im_statuspage_rule, im_org_settings, user_notification_settings, notification_template |
| Status pages | status_page, status_page_design, status_page_audience_groups, status_page_component, status_page_component_group, status_page_maintenance, status_page_domain, status_page_domain_activation |
| Organization | organization_settings, organization_branding, whitelabel_domain, report, smtp_settings, user, sso_oidc, sso_domain_verification |
Data sources read monitors and the lookups you need to wire things together, for example uptimeify_customer and uptimeify_im_team by name, uptimeify_im_on_call, uptimeify_monitoring_locations and uptimeify_package_configs.
apply and destroy act for real. uptimeify_user sends the invitation email on create and deletes the user on destroy.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:
uptimeify API: HTTP 400 checkKeywordEnabled requires searchTerm (code checkRequiresValue) [requestId 0e8f8f12-...]The codes are listed in Error codes and known pitfalls. Quote the request id when you contact support.
Support
Questions and feature requests: hello@uptimeify.io. The provider is open source under MPL-2.0.