Skip to content

Commit

Permalink
updated github-google-workload-identity post
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwood committed Sep 3, 2024
1 parent ee1909f commit 2c2e578
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ This option gives a bit more flexibility and enables you to have multiple pipeli
same Google service account if you want.

Below command creates the needed policy binding and binds it to whatever JWT token from the "github" identity pool that
has the `repository` attribute set with a value of `<repo-owner>/<repo-user>`.
has the `repository` attribute set with a value of `<repo-owner>/<repo-name>`.

```sh
gcloud iam service-accounts add-iam-policy-binding $SA_NAME@$G_PROJECT_ID.iam.gserviceaccount.com \
--role roles/iam.workloadIdentityUser \
--member principalSet://iam.googleapis.com/$POOL_NAME/attribute.repository/<repo-owner>/<repo-user>
--member principalSet://iam.googleapis.com/$POOL_NAME/attribute.repository/<repo-owner>/<repo-name>
```

That's it.
Expand Down

0 comments on commit 2c2e578

Please sign in to comment.