Uptime monitoring as code with Terraform

Yes, OnlineOrNot works with Terraform. The onlineornot/onlineornot provider on the Terraform Registry manages uptime, browser, DNS and TCP checks, heartbeats, status pages, maintenance windows, webhooks, environment variables and API tokens. Review monitoring changes in pull requests and apply them from CI.


How to connect OnlineOrNot to Terraform

  1. Sign up for OnlineOrNot and create an API token with edit access to the resources Terraform will manage.
  2. Set the token in the ONLINEORNOT_API_KEY environment variable.
  3. Add onlineornot/onlineornot to required_providers and run terraform init.
  4. Declare checks with resources such as onlineornot_uptime_check and onlineornot_browser_check, then run terraform plan and terraform apply.

What you can manage with Terraform

Frequently asked questions

Does OnlineOrNot work with Terraform?

Yes. OnlineOrNot has an official Terraform provider: use source = "onlineornot/onlineornot" in required_providers. The provider is generated from the same OpenAPI description as the OnlineOrNot API, so it keeps up with new API features.

Can I deploy Playwright tests with Terraform?

Yes. Write a standard @playwright/test file, run it locally, and set script = file("homepage.spec.js") on onlineornot_browser_check. Editing the file updates the same monitor. Each check takes one self-contained file: local imports, configuration files and extra dependencies are not uploaded.

Can Terraform route alerts to Slack, PagerDuty or Teams?

Yes. Connect the integration once in the dashboard, then list its ID in slack_alerts, oncall_alerts, microsoft_teams_alerts or another alert setting on each check or heartbeat.

Is there a TypeScript option?

Yes. Use the TypeScript SDK for scripts, or let Claude Code or Cursor set up monitoring for you. See monitoring as code.

Documentation

Start monitoring
in 30 seconds:

Free 14-day trial · No credit card required

Join thousands of teams already using OnlineOrNot