# Checkly Pulumi Provider

**Source**: https://www.checklyhq.com/product/pulumi-provider/

> Declare Checkly checks, groups, and alert channels as Pulumi resources in TypeScript, Python, Go, or .NET. They ship in the same pull request as the service, preview in the same plan, and land with the same `pulumi up`.

## What it does

- **One program, one plan, one apply**: checks live in the same stack as the service. `pulumi preview` shows the monitor changes beside the infra changes, and one `pulumi up` lands both. Resource references resolve at deploy time, so a check can target the URL Pulumi just created.
- **The language you already write**: the provider ships as an SDK for every major Pulumi language. Loop over services to generate checks, share a locations constant, wrap a check in a function your whole org calls.
- **Every Checkly resource**: groups, alert channels, status pages, private locations, maintenance windows, and environment variables are all resources, so the whole monitoring setup is reproducible from the repo.
- **From one check to a paged team in three resources**: a `checkly.Check` points at the Playwright spec in your repo; a `checkly.CheckGroup` carries shared locations, tags, and concurrency, with checks joining through `groupId`; a `checkly.AlertChannel` for Slack, email, Opsgenie, PagerDuty, or a webhook is subscribed once at the group level.
- **See the diff before anything changes in production**: `pulumi up` previews every create, update, and delete against the stack state and waits for a yes.

## Get started in four steps

1. **Create a Pulumi project**: `pulumi new typescript`.
2. **Install the provider**: `npm install @checkly/pulumi`.
3. **Provide your credentials**: `CHECKLY_ACCOUNT_ID` and `CHECKLY_API_KEY` as environment variables, or `pulumi config set checkly:accountId` and `pulumi config set checkly:apiKey --secret`.
4. **Preview, then apply**: `pulumi up`.

## Three ways to write monitoring as code

- **Checkly CLI**: TypeScript constructs, `npx checkly test` to run checks locally and in CI before deploying, and the fastest access to new check types. Start here unless you have a reason not to.
- **Pulumi provider**: monitors become resources in your existing Pulumi program, in the same language, previewed and applied with the same command. Manage each resource in Pulumi or in the UI, never both.
- **Terraform provider**: the same resources in HCL for teams standardised on Terraform.

## Key facts

- Packages: `@checkly/pulumi` (TypeScript and JavaScript), `pulumi-checkly` (Python), `github.com/checkly/pulumi-checkly/sdk/v2/go/checkly` (Go), `Pulumi.Checkly` (.NET). Current major version 2.x.
- Resources: Check, PlaywrightCheckSuite, CheckGroup, AlertChannel, UrlMonitor, TcpMonitor, DnsMonitor, IcmpMonitor, HeartbeatMonitor, PrivateLocation, StatusPage and StatusPageService, Dashboard, MaintenanceWindow, EnvironmentVariable, Snippet, ClientCertificate.
- One owner per resource: editing a Pulumi-managed check in the UI creates drift that the next `pulumi up` will overwrite or fail on.

## Frequently Asked Questions

### What is the Checkly Pulumi provider?
A Pulumi resource provider, published as @checkly/pulumi on npm and in the Pulumi registry, that lets you declare Checkly checks, groups, alert channels, status pages, private locations, and the rest of your monitoring setup as resources in a Pulumi program. pulumi up creates and updates them the same way it manages your cloud infrastructure.

### Which languages does the provider support?
TypeScript and JavaScript via @checkly/pulumi, Python via pulumi-checkly, Go via github.com/checkly/pulumi-checkly/sdk/v2/go/checkly, and .NET via the Pulumi.Checkly NuGet package. Use whichever language the rest of your Pulumi program is written in.

### Should I use the Pulumi provider or the Checkly CLI?
The Checkly CLI is the primary monitoring-as-code path: TypeScript constructs, npx checkly test to run checks locally and in CI before deploying, and the deepest coverage of new features. Pick the Pulumi provider when your team already manages infrastructure in Pulumi and wants monitors in the same program, state, and review flow. Both talk to the same Checkly account.

### How do I authenticate the provider?
Provide a Checkly account ID and API key. Set them as the CHECKLY_ACCOUNT_ID and CHECKLY_API_KEY environment variables, or store them on the stack with pulumi config set checkly:accountId and pulumi config set checkly:apiKey --secret so the key is encrypted in your stack config.

### Can I edit Pulumi-managed checks in the Checkly web app?
You can, but you should not. Manage each resource either through Pulumi or through the UI. Editing a Pulumi-managed check in the UI creates drift that the next pulumi up will overwrite or fail on. Keep Pulumi-managed monitoring in Pulumi.

### Which Checkly resources can I create with Pulumi?
Check (API and browser), PlaywrightCheckSuite, CheckGroup, AlertChannel, UrlMonitor, TcpMonitor, DnsMonitor, IcmpMonitor, HeartbeatMonitor, PrivateLocation, StatusPage and StatusPageService, Dashboard, MaintenanceWindow, EnvironmentVariable, Snippet, and ClientCertificate. The full reference lives in the Pulumi registry.

### Does Checkly also have a Terraform provider?
Yes. The Terraform provider covers the same resources for teams standardised on HashiCorp tooling. Pulumi, Terraform, and the Checkly CLI all manage the same account, so pick the one your infrastructure already speaks.

## Related

- [Pulumi Provider (full page)](https://www.checklyhq.com/product/pulumi-provider/)
- [Pulumi provider docs](https://www.checklyhq.com/docs/integrations/iac/pulumi/overview/)
- [Provider on the Pulumi registry](https://www.pulumi.com/registry/packages/checkly/)
- [Terraform Provider](https://www.checklyhq.com/product/terraform-provider/)
- [Monitoring as Code](https://www.checklyhq.com/product/monitoring-as-code/)
- [Start for free](https://app.checklyhq.com/signup/)
