Guides

Manage a workspace with Terraform

Safely automate monitors, on-call configuration, teams, maintenance, services, and status pages.

Each HowlOps provider instance is bound to the workspace encoded in its API token. There is no tenant argument, so configuration cannot accidentally cross workspace boundaries.

Create a least-privilege token

Create a dedicated token in Settings → API tokens. Use read and write for ordinary resources. Add admin only for teams, members, invitations, or other allow-listed workspace administration. Its owner must remain a workspace owner or admin.

Export the value as HOWLOPS_TOKEN; never put it in .tf files.

Configure and apply

hcl
terraform {
  required_providers {
    howlops = { source = "howlops/howlops", version = "~> 0.1" }
  }
}

provider "howlops" {}

resource "howlops_monitor" "homepage" {
  name               = "Homepage"
  type               = "http"
  url                = "https://example.com/"
  interval_s         = 120
  timeout_s          = 15
  valid_status_codes = ["200-299"]
}

Run terraform init, review terraform plan, then apply. Use a separate provider alias and token for every workspace.

Import and secrets

Resources import by stable UUID, for example terraform import howlops_monitor.homepage MONITOR_UUID. Add required arguments after import. Monitor passwords, authorization headers, and notification-channel secrets are write-only and cannot be recovered by an automation token.

Mutations are idempotent, rate-limit retries honor Retry-After, 404 removes remote objects from state, and conflicts are reported instead of overwritten. Keep state in an encrypted remote backend. See API tokens for scope details.

Was this page helpful?