Skip to content

Commit 8a98317

Browse files
authored
Add GHA service account ActAs detail (#17)
This is to ensure that the GHA SA that was set up by the user has been given the `iam.serviceAccountUser` role.
1 parent b2d37cf commit 8a98317

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

workflows/create-cloud-deploy-release/cloud-deploy-to-cloud-run.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@
5757
# --format="value(projectNumber)")[email protected]" \
5858
# --role="roles/iam.serviceAccountUser"
5959
#
60+
# If you have not already done so, the service account you are using via Workload Identity Federation
61+
# additionally needs to be permitted to "ActAs" the default compute service account. Substitute
62+
# your GHA service account name for [YOUR_GHA_SERVICE_ACCOUNT] in the following command:
63+
#
64+
# gcloud iam service-accounts add-iam-policy-binding $(gcloud projects describe ${PROJECT_ID} \
65+
# --format="value(projectNumber)")[email protected] \
66+
# --member="serviceAccount:[YOUR_GHA_SERVICE_ACCOUNT]@${PROJECT_ID}.iam.gserviceaccount.com" \
67+
# --role="roles/iam.serviceAccountUser"
68+
#
6069
# NOTE: You should always follow the principle of least privilege when assigning IAM roles
6170
#
6271
# 5. Create GitHub secrets for WIF_PROVIDER and WIF_SERVICE_ACCOUNT

0 commit comments

Comments
 (0)