This guide walks you through the complete setup process for using Pulumi with Checkly, from initial installation to your first deployment.

Prerequisites

Before starting, ensure you have:
  • Node.js (version 14 or higher)
  • Git for version control
  • Checkly account with API access
  • Pulumi account (free tier available)

Step 1: Install Pulumi CLI

1

Choose Installation Method

Select your preferred installation method based on your operating system and package manager
2

Install Pulumi

Run the appropriate installation command for your system
3

Verify Installation

Confirm Pulumi CLI is working correctly

Installation Options

npm install -g @pulumi/pulumi

Verify Installation

verify-installation
pulumi version
You should see output similar to:
v3.100.0

Step 2: Pulumi Account Setup

Create Account

  1. Visit app.pulumi.com/signup
  2. Sign up with your preferred method (GitHub, GitLab, etc.)
  3. Complete the account verification process

Generate Access Token

  1. Navigate to app.pulumi.com/account/tokens
  2. Click “Create token”
  3. Give your token a descriptive name (e.g., “Checkly Integration”)
  4. Copy the generated token (you won’t be able to see it again)
Store your access token securely. You can use environment variables or a password manager to keep it safe.

Login to Pulumi

login-pulumi
pulumi login
When prompted, paste your access token or press Enter to use browser-based authentication. Verify your login:
verify-login
pulumi whoami

Step 3: Checkly API Configuration

Get Your Account ID

  1. Log into app.checklyhq.com
  2. Navigate to SettingsAccountGeneral
  3. Copy your Account ID

Create API Key

  1. Go to SettingsUserAPI Keys
  2. Click “Create API Key”
  3. Give it a descriptive name (e.g., “Pulumi Integration”)
  4. Copy the generated API key (starts with cu_)
API keys have full access to your Checkly account. Keep them secure and never commit them to version control.

Step 4: Project Setup

Create Project Directory

create-project
mkdir my-checkly-monitoring && cd my-checkly-monitoring

Initialize Pulumi Project

init-pulumi-project
pulumi new javascript
Follow the prompts:
  • Project name: my-checkly-monitoring (or your preferred name)
  • Project description: Checkly monitoring infrastructure as code
  • Stack name: dev (or your preferred environment name)

Install Checkly Provider

npm install @checkly/pulumi

Step 5: Configure Authentication

Add to your shell profile (.bashrc, .zshrc, etc.):
setup-env-vars
export CHECKLY_ACCOUNT_ID=your_account_id
export CHECKLY_API_KEY=your_api_key
Reload your shell or source the profile:
reload-shell
source ~/.bashrc  # or ~/.zshrc
setup-pulumi-config
pulumi config set checkly:apiKey your_api_key --secret
pulumi config set checkly:accountId your_account_id
Using Pulumi configuration is better for team environments as it stores settings with your stack and can be shared across team members.

Verify Configuration

Test that your credentials are accessible:
verify-env-vars
echo $CHECKLY_ACCOUNT_ID
echo $CHECKLY_API_KEY
Or check Pulumi config:
check-pulumi-config
pulumi config

Step 6: Create Your First Check

Update index.js

Replace the contents of index.js with:
index.js
const checkly = require('@checkly/pulumi')

// Create a simple API check
new checkly.Check('hello-world-api', {
  name: 'Hello World API',
  activated: true,
  frequency: 10,
  type: 'API',
  locations: ['eu-west-1'],
  tags: ['pulumi', 'example'],
  request: {
    method: 'GET',
    url: 'https://httpbin.org/status/200',
    assertions: [
      {
        source: 'STATUS_CODE',
        comparison: 'EQUALS',
        target: '200',
      },
    ],
  },
  useGlobalAlertSettings: true,
})

Step 7: Deploy Your Infrastructure

Preview Changes

preview-changes
pulumi preview
This shows you what resources will be created without making changes.

Deploy

deploy-infrastructure
pulumi up
When prompted, type yes to confirm the deployment.
Congratulations! You’ve successfully set up Pulumi with Checkly and deployed your first monitoring check.

Step 8: Verify Deployment

  1. Visit your Checkly dashboard
  2. Navigate to Checks
  3. You should see your new “Hello World API” check
  4. The check should be running and showing as “Passing”

Next Steps

Troubleshooting

Common Issues

If you see authentication errors, verify:
  • Your Checkly API key is correct and active
  • Your account ID is correct
  • Environment variables are properly set
  • You’re logged into Pulumi (pulumi whoami)
If the Checkly provider isn’t found:
  • Ensure you’ve installed @checkly/pulumi
  • Check your package.json for the dependency
  • Run npm install or yarn install
If you get permission errors:
  • Verify your API key has the necessary permissions
  • Check that your account ID is correct
  • Ensure you’re using the right Checkly account