Pulumi PagerDuty Provider
raw JSON → 4.31.4 verified Sat May 09 auth: no python
A Pulumi package for creating and managing PagerDuty cloud resources. Current version 4.31.4, with weekly releases tracking the upstream Terraform provider.
pip install pulumi-pagerduty Common errors
error ImportError: No module named 'pagerduty' ↓
cause Using wrong import path: `import pagerduty` instead of `import pulumi_pagerduty`.
fix
Use
import pulumi_pagerduty as pagerduty error pulumi.ConfigError: Missing required configuration key 'pagerduty:token' ↓
cause PagerDuty API token not provided via config or environment variable.
fix
Set PAGERDUTY_TOKEN environment variable or run
pulumi config set pagerduty:token <token> --secret error pulumi.errors.ResourceError: Error reading resource: unexpected EOF ↓
cause PagerDuty API token is invalid or expired.
fix
Generate a new API token from PagerDuty console and update configuration.
Warnings
gotcha API token must be provided via config or environment variable; using plain text in code is insecure. ↓
fix Set PAGERDUTY_TOKEN environment variable or use pulumi config set pagerduty:token --secret
breaking Upgrading from v3 to v4 may require changes due to upstream Terraform provider schema changes. ↓
fix Review the upgrade guide at https://www.pulumi.com/registry/packages/pagerduty/installation-configuration/
deprecated Some resources like pagerduty.EscalationPolicy have deprecated fields (e.g., num_loops). ↓
fix Use the 'description' field instead of deprecated 'num_loops' if applicable.
Imports
- pagerduty wrong
import pagerdutycorrectimport pulumi_pagerduty as pagerduty
Quickstart
import pulumi
import pulumi_pagerduty as pagerduty
# Configure PagerDuty provider with API token from environment
pagerduty_provider = pagerduty.Provider(
"pagerduty-provider",
token=pulumi.Config().require_secret("pagerduty:token"),
)
# Create a PagerDuty team
team = pagerduty.Team(
"my-team",
name="My Team",
description="Team managed by Pulumi",
opts=pulumi.ResourceOptions(provider=pagerduty_provider),
)
pulumi.export("team_id", team.id)