Compare commits

...
Author SHA1 Message Date
Andrew BeveridgeandClaude Opus 4.5 8ec4bb991b fix: Add IAM permissions for Pulumi to refresh state in CI
- Add roles/resourcemanager.projectIamAdmin for IAM binding state refresh
- Add roles/secretmanager.admin for secret state refresh

These permissions are required for Pulumi to read the current state of
all managed resources during the refresh phase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 18:56:05 -05:00
2 changed files with 19 additions and 1 deletions

No files matched your search

+3 -1
View File
@@ -1189,7 +1189,9 @@ jobs:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
run: |
echo "🚀 Deploying infrastructure changes..."
pulumi up --yes --refresh --stack nomadkaraoke/karaoke-gen-infrastructure/prod
# Skip preview to avoid needing broad read permissions on all GCP resources
# Pulumi state is authoritative since infrastructure is only managed via Pulumi
pulumi up --yes --skip-preview --stack nomadkaraoke/karaoke-gen-infrastructure/prod
- name: Restart GCE Encoding Worker
run: |
+16
View File
@@ -373,6 +373,22 @@ github_actions_service_usage = gcp.projects.IAMMember(
member=github_actions_sa.email.apply(lambda email: f"serviceAccount:{email}"),
)
# Grant Project IAM Admin - required for Pulumi to refresh IAM binding state
github_actions_iam_admin = gcp.projects.IAMMember(
"github-actions-iam-admin",
project=project_id,
role="roles/resourcemanager.projectIamAdmin",
member=github_actions_sa.email.apply(lambda email: f"serviceAccount:{email}"),
)
# Grant Secret Manager Admin - required for Pulumi to refresh secret state
github_actions_secretmanager = gcp.projects.IAMMember(
"github-actions-secretmanager",
project=project_id,
role="roles/secretmanager.admin",
member=github_actions_sa.email.apply(lambda email: f"serviceAccount:{email}"),
)
# ==================== Workload Identity Federation ====================
# Allows GitHub Actions to authenticate without service account keys