Guest User

Untitled

a guest
Sep 8th, 2021
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #!/bin/bash
  2. # requires gcloud command line tools; go to https://cloud.google.com/sdk/docs/quickstarts to get them
  3. # max 100 service accounts per project
  4. # run gcloud init --console-only first and select a project
  5. #
  6. # Want to use these for rclone? Service Account Loadbalancing is implemented in this build:
  7. # https://git.fionera.de/fionera/rclone/releases
  8. KEYS_DIR=~/keys
  9.  
  10. for name in service{1..100}; do
  11. echo $name
  12. gcloud iam service-accounts create $name
  13. done
  14. for name in $(gcloud iam service-accounts list --format='value(email)'); do
  15. echo $name
  16. gcloud iam service-accounts keys create $KEYS_DIR/$name.json --iam-account=$name
  17. done
  18. gcloud iam service-accounts list --format='value(email)'
  19.  
Advertisement
Add Comment
Please, Sign In to add comment