From bf8fc6aac534dcc026ad0dfc8858a7bc85be5e4b Mon Sep 17 00:00:00 2001 From: Takwa Date: Wed, 14 Oct 2026 18:56:42 +0200 Subject: [PATCH] Stay on the PagerDuty Free plan: stop using a team Teams are a paid feature, and we're staying on the Free plan (5 users, one schedule, one escalation policy). The schedule and the escalation policy no longer belong to the "ipni" team, and Terraform stops managing the team and its memberships (removed blocks with destroy = false), so nothing breaks when the trial ends and the plan drops teams. Who is paged comes from the schedule and the escalation policy, not the team. Co-Authored-By: Claude Opus 5.5 --- pagerduty/README.md | 11 ++++++++++- pagerduty/main.tf | 37 ++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pagerduty/README.md b/pagerduty/README.md index 0488d37..19f5df0 100644 --- a/pagerduty/README.md +++ b/pagerduty/README.md @@ -5,7 +5,7 @@ Who is on call for IPNI, and where pages go. The paging runbook is in | Resource | What | |---|---| -| Team **ipni** and its members | `pagerduty_team`, `pagerduty_user`, `pagerduty_team_membership` | +| Members | `pagerduty_user` (no team: see [Plan](#plan)) | | Schedule **IPNI on-call** | One person at a time, a week each, handing over on Monday at 09:00 UTC, in alias order | | Escalation policy **IPNI** | The person on call, then everyone after 15 minutes; runs twice. Was the account's "Default" policy | | Service **Service Worker Gateway** | Paged by Cloudflare when inbrowser.link is down (`production_down_page` in `cloudflare/notifications`). Was the "Default Service" that connecting Cloudflare created; its Cloudflare integration isn't managed here | @@ -15,6 +15,15 @@ Who is on call for IPNI, and where pages go. The paging runbook is in State: `s3://ipni-terraform-state/pagerduty/terraform.tfstate`. CI plans and applies it with the Cloudflare stacks (same workflow, same approval). +## Plan + +We stay on PagerDuty's **Free** plan: up to 5 users, one schedule and one +escalation policy, with the API and integrations included, and 100 phone or +SMS notifications a month (push through the app isn't capped). Teams are a +paid feature, so nothing here uses one: who is paged comes from the schedule +and the escalation policy. The team `ipni` created in the UI is no longer +managed by Terraform. A 6th person, or a second rotation, needs a paid plan. + ## Not managed here - **Each person's contact methods and notification rules** (app, SMS, phone): diff --git a/pagerduty/main.tf b/pagerduty/main.tf index 3f17f57..13b33f4 100644 --- a/pagerduty/main.tf +++ b/pagerduty/main.tf @@ -18,15 +18,22 @@ locals { on_call = [for a in sort(local.aliases) : a if nonsensitive(var.members[a].on_call)] } -# Created in the UI. -resource "pagerduty_team" "ipni" { - name = "ipni" - description = local.managed_by +# Teams are a paid feature, and we stay on the Free plan (5 users, one +# schedule, one escalation policy). Terraform no longer manages the team +# "ipni" or its memberships; they stay in PagerDuty until the plan drops them, +# and who is paged comes from the schedule and escalation policy anyway. +removed { + from = pagerduty_team.ipni + lifecycle { + destroy = false + } } -import { - to = pagerduty_team.ipni - id = "PWRBIVW" +removed { + from = pagerduty_team_membership.member + lifecycle { + destroy = false + } } resource "pagerduty_user" "member" { @@ -55,27 +62,12 @@ import { id = each.value } -resource "pagerduty_team_membership" "member" { - for_each = local.aliases - - team_id = pagerduty_team.ipni.id - user_id = pagerduty_user.member[each.key].id -} - -import { - for_each = local.existing_users - - to = pagerduty_team_membership.member[each.key] - id = "${each.value}:PWRBIVW" -} - # One person on call at a time, a week each, handing over on Monday at 09:00 # UTC, in alias order. resource "pagerduty_schedulev2" "on_call" { name = "IPNI on-call" description = local.managed_by time_zone = "Etc/UTC" - teams = [pagerduty_team.ipni.id] # PagerDuty stores Etc/UTC as "UTC", which the provider rejects as a value, # so every plan wanted to change it back. To change the time zone, remove @@ -114,7 +106,6 @@ resource "pagerduty_escalation_policy" "ipni" { name = "IPNI" description = local.managed_by num_loops = 2 - teams = [pagerduty_team.ipni.id] rule { escalation_delay_in_minutes = 15