Vigil as Terraform.
Monitors, alert channels, status pages and server slots as resources, for Terraform and OpenTofu. Provision a VM and its monitoring in the same apply: the server resource hands you the agent install command for cloud-init.
Install the provider v1.0.0
# Terraform filesystem mirror (no registry account needed)
V=1.0.0; OS=linux; ARCH=amd64 # darwin/windows · amd64/arm64
D=~/.terraform.d/plugins/puzaricloud.in/vigil/vigil/$V/${OS}_$ARCH
mkdir -p $D && curl -fsSL https://puzaricloud.in/terraform/terraform-provider-vigil_${V}_${OS}_${ARCH}.zip -o /tmp/p.zip && unzip -o /tmp/p.zip -d $D
terraform init
Downloads: darwin_amd64 · darwin_arm64 · linux_amd64 · linux_arm64 · windows_amd64 · SHA256SUMS · README. Source is in the self-hosted bundle (terraform-provider-vigil/, Go 1.23).
Authenticate
export VIGIL_API_KEY=vg_… # Settings → API key, or a scoped read/write key export VIGIL_ENDPOINT=https://vigil.yourcompany.com # self-hosted only
Example
terraform {
required_providers {
vigil = { source = "puzaricloud.in/vigil/vigil" }
}
}
provider "vigil" {}
resource "vigil_channel" "ops" {
kind = "slack"
config = { url = var.slack_webhook }
}
resource "vigil_monitor" "api" {
name = "Checkout API"
mode = "api"
url = "https://api.example.com/health"
interval_minutes = 1
assertions = "json status == ok"
channel_ids = [vigil_channel.ops.id]
slo_target = 99.9
}
resource "vigil_server" "web" {
count = 3
name = "web-${count.index}"
tags = ["prod"]
rules_json = jsonencode({ disk_pct = 85, watch_services = ["nginx"] })
channel_ids = [vigil_channel.ops.id]
}
# hcloud / aws_instance / google_compute_instance …
# user_data = "#!/bin/sh\n${vigil_server.web[count.index].install_command}\n"
resource "vigil_status_page" "public" {
title = "Example status"
slug = "example"
visibility = "public"
monitor_ids = [vigil_monitor.api.id]
}
Resources: vigil_monitor (all 11 monitor types, import by id), vigil_channel (+ data source by name), vigil_status_page, vigil_server. Plan limits apply exactly as in the UI; changes made in the UI show up as drift. Prefer YAML? Monitors as code applies a file over the API.