Skip to main content

Introduction

The Rootly Pulumi provider lets you manage your Rootly configuration — severities, services, functionalities, on-call schedules, escalation policies, workflows, custom form fields, and more — as infrastructure as code using Pulumi. This allows you to version-control your Rootly configuration, apply changes through CI/CD pipelines, and keep your incident management setup consistent across environments. The provider is built on top of the Rootly Terraform provider and is available on the Pulumi Registry.
The Rootly Pulumi provider currently supports JavaScript and TypeScript only. Support for Python, Go, and .NET is not yet available.

Before You Begin

Before setting up the Pulumi provider, make sure you have:
  • Pulumi CLI installed
  • Node.js installed
  • A Rootly API token — generate one in Account > Manage API keys > Generate New API Key

Installation

Install the npm package

Add the Rootly Pulumi package to your project:
npm install @rootly/pulumi
Or with Yarn:
yarn add @rootly/pulumi

Install the provider plugin

Install the Pulumi provider binary:
pulumi plugin install resource rootly v0.0.2 \
  --server https://github.com/rootlyhq/pulumi-rootly/releases/download/v0.0.2

Configure your API token

Set your Rootly API token. The recommended approach is to store it as an encrypted Pulumi secret:
pulumi config set rootly:apiToken YOUR_API_TOKEN --secret
Alternatively, use an environment variable:
export ROOTLY_API_TOKEN=YOUR_API_TOKEN
Always use --secret when setting the API token via pulumi config to ensure it is encrypted in your stack state. Never commit an unencrypted API token to version control.

Creating Resources

Import the provider and declare resources in your Pulumi program. The following example creates a set of severities, services, functionalities, and a workflow:
import * as rootly from "@rootly/pulumi";

// Severities
const sev0 = new rootly.Severity("sev0", {
  name: "SEV0",
  color: "#FF0000",
});

const sev1 = new rootly.Severity("sev1", {
  name: "SEV1",
  color: "#FFA500",
});

// Services
const apiService = new rootly.Service("api_service", {
  name: "production-api",
  color: "#800080",
});

// Functionalities
const checkout = new rootly.Functionality("checkout", {
  name: "Checkout",
  color: "#FFFFFF",
});

Supported Resources

The provider supports the full range of Rootly configuration resources, including:
CategoryExamples
Incident classificationSeverity, IncidentType, IncidentRole
Services & infrastructureService, Functionality, Environment, Team
On-callSchedule, EscalationPolicy
WorkflowsWorkflowIncident, WorkflowActionItem, and 200+ workflow task types
Forms & fieldsFormField, FormFieldOption
Status pagesStatusPage, StatusPageTemplate
For the full resource reference, see the Pulumi Registry documentation.

Deploying Changes

Preview changes before applying them:
pulumi preview
Apply your changes:
pulumi up
Pulumi will show a diff of resources to be created, updated, or deleted before prompting for confirmation.

Troubleshooting

Confirm your API token is set correctly. If using pulumi config, run pulumi config get rootly:apiToken to verify the value is present. If using the environment variable, confirm ROOTLY_API_TOKEN is exported in your shell. Check that the token has not been revoked in Rootly under Account > Manage API keys.
Run the plugin install command again to ensure the binary is present:
pulumi plugin install resource rootly v0.0.2 \
  --server https://github.com/rootlyhq/pulumi-rootly/releases/download/v0.0.2
You can verify installed plugins with pulumi plugin ls.
Check the error message from the Pulumi output — it typically includes the Rootly API response. Common causes include missing required fields (e.g., name or color on a Severity) or invalid field values. Cross-reference with the Rootly API reference for valid field constraints.
Run pulumi refresh to reconcile Pulumi’s state with the actual state in Rootly. If resources were modified outside of Pulumi (e.g., via the Rootly UI), they may be out of sync with the Pulumi stack state.

Terraform

The Rootly Terraform provider — the Pulumi provider is built on top of it.

Rootly API

The Rootly API reference — all resources the provider manages are available here.

Pulumi Registry

Full resource reference and API docs on the Pulumi Registry.