Skip to content

Instantly share code, notes, and snippets.

@steeve
Last active November 10, 2020 17:35
Show Gist options
  • Save steeve/8cba5d34116cec9337bcf6769d25d852 to your computer and use it in GitHub Desktop.
Save steeve/8cba5d34116cec9337bcf6769d25d852 to your computer and use it in GitHub Desktop.
bazel-cache-blog-post
gcloud iam service-accounts create bazel-cache --project MYPROJECT
ROLES=(run.invoker storage.objectCreator storage.objectViewer)
for role in ${ROLES}; do
gcloud projects add-iam-policy-binding MYPROJECT \
--member=serviceAccount:bazel-cache@MYPROJECT.iam.gserviceaccount.com \
--role=roles/${role}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment