weave
module · Comms & Incident

PagerDuty

PagerDuty — users, schedules, services, incidents, on-call

Namespace: weave pagerduty Env: PAGERDUTY_TOKEN
10
Commands
1
State kinds
Comms & Incident
Category
1
API docs

Setup

Configure credentials via environment variables. We recommend sourcing them through 1Password or your secrets manager rather than committing them to the shell rc.

Official API reference

weave commands for this module are checked against the vendor's published API.

Variable Description Status
PAGERDUTY_TOKENRequired for authentication.required
PAGERDUTY_API_URLRequired for authentication.required
PAGERDUTY_FROMRequired for authentication.required
PAGERDUTY_API_URLAPI root (default: https://api.pagerduty.com).optional
PAGERDUTY_FROMFrom-address header for mutating API calls.optional

Sanity-check the wiring:

weave secrets check
weave pagerduty --help
weave doctor   # reports PAGERDUTY_TOKEN status

Capabilities

What this module can do, by entity and verb. means a working CLI surface; · means not (yet) wired.

Entity findlistshowdosnapshotdiffapply
incident····
oncall······
schedule······
service···
team······
user·····

Commands

Every registered CLI command, grouped by verb. Each example uses placeholder arguments — substitute real values for your environment.

find (2)

find incident

read

Find an incident by id.

weave pagerduty find incident <incident-id>

find user

read

Find a PagerDuty user by email.

weave pagerduty find user <email>

list (5)

list incidents

read

List recent incidents.

weave pagerduty list incidents <arg>

list schedules

read

List on-call schedules.

weave pagerduty list schedules <arg>

list services

read

List PagerDuty services.

weave pagerduty list services <arg>

list teams

read

List teams.

weave pagerduty list teams <arg>

list users

read

List PagerDuty users.

weave pagerduty list users <arg>

show (1)

show oncall

read

Show who is on-call right now (optionally for a schedule).

weave pagerduty show oncall <arg>

do (2)

do acknowledge

write

Acknowledge an incident by id.

weave pagerduty do acknowledge <incident-id>

do resolve

write

Resolve an incident by id.

weave pagerduty do resolve <incident-id>
snapshot / diff / apply are generated automatically from the State Kinds declared on this module — see the State kinds section below for per-kind details. Workflow: snapshot → edit YAML → diffapply --yes (or confirm interactively; apply --dry-run previews the same diff).

State kinds

Resources this module can snapshot and diff; apply where the kind supports live writes (see Round-trip per kind). Always run diff before apply; use --yes in automation after review. Files live under .weave-state/pagerduty/.

services

snapshot diff apply

All services on the PagerDuty account (name, description, escalation policy).

Scope
Round-trip
Full round-trip — snapshot, diff, apply.

State file skeleton

module: pagerduty
kind: services
items:
  - # <fields specific to this kind — see snapshot output>

Workflows

End-to-end recipes from operators who already run this module in production. Copy, adapt, and put under change-control.

Version-control service definitions

weave pagerduty snapshot services
$EDITOR .weave-state/pagerduty/services.yaml
weave pagerduty diff services
weave pagerduty apply services --yes

Acknowledge and resolve an incident

weave pagerduty find incident <incident-id>
weave pagerduty do acknowledge <incident-id> --yes
weave pagerduty do resolve <incident-id> --yes

Who is on call right now?

weave pagerduty show oncall
weave pagerduty list schedules

Find the on-call engineer during an outage

weave pagerduty show oncall
weave pagerduty find user oncall@company.com
weave pagerduty list services

Terraform parity

For each Terraform resource in the canonical provider, here's the equivalent live-API verb in weave. Use this as a migration cheat-sheet, not a 1:1 contract — weave deliberately stays in the live-state lane, not the desired-state lane.

Terraform resource weave equivalent
pagerduty_serviceweave pagerduty snapshot/diff/apply services
pagerduty_incidentweave pagerduty find/list incident + do acknowledge/resolve
pagerduty_scheduleweave pagerduty list schedule / show oncall
pagerduty_userweave pagerduty find/list user
pagerduty_teamweave pagerduty list team

Troubleshooting & source

Missing credentials

Run weave doctor — it reports which env vars (including PAGERDUTY_TOKEN) are set and which are blank.

Unexpected behaviour from a state apply

Re-run weave pagerduty diff <kind> to confirm the controller's current state, then re-snapshot before the next apply. The driver always re-snapshots before diffing.