A Terraform provider for managing Uptime Kuma monitors and notifications through infrastructure-as-code.
- Manage HTTP/HTTPS monitors with advanced options (auth, TLS, redirects, body/header validation)
- Create monitors for various protocols: DNS, gRPC, TCP, Push, Ping, PostgreSQL, Redis, Real Browser
- Monitor groups for organizing related monitors
- Manage notification channels (webhook, Slack, Teams, ntfy)
- Configure generic notifications with JSON config for custom types
- Configure HTTP/HTTPS/SOCKS5 proxies for routing monitor requests
- Tag monitors and notifications for organization and filtering
This provider uses the go-uptime-kuma-client to interact with Uptime Kuma. The capabilities are limited to the features supported by the client library. If you need a feature not yet available, first check if it's supported in the client library.
- Terraform >= 1.0
- Go >= 1.25 (for development)
- Uptime Kuma instance with API access
- Docker (for running integration tests)
The provider is available on the Terraform Registry. Configure it in your Terraform code:
terraform {
required_providers {
uptimekuma = {
source = "breml/uptimekuma"
version = "~> 0.1"
}
}
}
provider "uptimekuma" {
endpoint = "http://localhost:3001"
username = "admin"
password = "password"
}resource "uptimekuma_monitor_http" "example" {
name = "Example API"
url = "https://api.example.com/health"
interval = 60
timeout = 30
active = true
}resource "uptimekuma_notification_webhook" "example" {
name = "Slack Webhook"
url = "https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
method = "POST"
is_active = true
}resource "uptimekuma_proxy" "example" {
host = "proxy.example.com"
port = 8080
protocol = "http"
active = true
}uptimekuma_monitor_http- HTTP/HTTPS monitoringuptimekuma_monitor_http_keyword- HTTP monitoring with keyword detectionuptimekuma_monitor_http_json_query- HTTP monitoring with JSON query validationuptimekuma_monitor_grpc_keyword- gRPC monitoring with keyword detectionuptimekuma_monitor_ping- ICMP ping monitoringuptimekuma_monitor_dns- DNS query monitoringuptimekuma_monitor_tcp_port- TCP port connectivityuptimekuma_monitor_push- Push monitoring (external push events)uptimekuma_monitor_postgres- PostgreSQL database monitoringuptimekuma_monitor_redis- Redis database monitoringuptimekuma_monitor_real_browser- Browser-based monitoringuptimekuma_monitor_group- Monitor groups for organization
uptimekuma_notification- Generic notification with JSON configuptimekuma_notification_webhook- Webhook notificationsuptimekuma_notification_slack- Slack integrationuptimekuma_notification_teams- Microsoft Teams integrationuptimekuma_notification_ntfy- ntfy.sh notifications
uptimekuma_proxy- HTTP/HTTPS/SOCKS5 proxy configuration
uptimekuma_tag- Tags for organizing monitors and notifications
Full documentation including all resource attributes and examples is available on the Terraform Registry.
task build# Unit tests
task test
# Acceptance tests (requires Uptime Kuma instance)
task testacctask generate-docstask format # Format code
task lint # Run lintersContributions are welcome! Please ensure:
- Code is formatted with
task format - Code passes linting with
task lint - Tests pass with
task testandtask testacc - Documentation is updated with
task generate-docs
This provider is licensed under the Mozilla Public License Version 2.0. See the LICENSE file for details.
For issues, feature requests, or questions, please use the GitHub repository.