Terraform (0.14+) provider for Better Uptime.
terraform {
required_version = ">= 0.14"
required_providers {
betteruptime = {
source = "BetterStackHQ/better-uptime"
version = ">= 0.9.3"
}
}
}
provider "betteruptime" {
# `api_token` can be omitted if BETTERUPTIME_API_TOKEN env var is set.
api_token = "XXXXXXXXXXXXXXXXXXXXXXXX"
}
resource "betteruptime_status_page" "this" {
company_name = "Example, Inc"
company_url = "https://example.com"
timezone = "UTC"
subdomain = "example"
}
resource "betteruptime_monitor" "this" {
url = "https://example.com"
monitor_type = "status"
}
resource "betteruptime_status_page_resource" "monitor" {
status_page_id = betteruptime_status_page.this.id
resource_id = betteruptime_monitor.this.id
resource_type = "Monitor"
public_name = "example.com site"
}
See examples/ for more.
See Better Uptime API docs to obtain API Token and get the complete list of parameter options. Or explore the Terraform Registry docs.
PREREQUISITE: go1.16+.
git clone https://github.com/BetterStackHQ/terraform-provider-better-uptime && \
cd terraform-provider-better-uptime
make help