You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.`roles/run.admin` - For Cloud Run deployment operations
94
+
2.`roles/iam.serviceAccountUser` on itself - To act as itself during deployment
95
+
3.`roles/iam.serviceAccountUser` on Compute Engine default SA - Required by Cloud Run
96
+
4.`roles/artifactregistry.writer` - To push images to Artifact Registry
97
+
98
+
## Important Notes
99
+
100
+
1.**Separate Service Accounts**: Consider using a separate service account for CI/CD deployment (e.g., `ci-cd-deployer@...`) rather than the runtime service account. This follows the principle of least privilege.
101
+
102
+
2.**Service Account User Role**: If deploying with a different service account than the runtime service account, you may also need `roles/iam.serviceAccountUser` to allow the deployment service account to act as the runtime service account.
103
+
104
+
3.**Region-Specific**: Cloud Run permissions are typically project-wide, but ensure the service account has access to the specific region where you're deploying.
105
+
106
+
## Troubleshooting
107
+
108
+
If you still get permission errors after granting `roles/run.admin`:
109
+
110
+
1.**Wait a few minutes** - IAM policy changes can take a few minutes to propagate
111
+
2.**Verify the service account email** - Ensure you're using the correct service account
112
+
3.**Check project ID** - Ensure you're granting permissions in the correct project
113
+
4.**Verify API is enabled** - Ensure Cloud Run API is enabled:
0 commit comments