Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # requires gcloud command line tools; go to https://cloud.google.com/sdk/docs/quickstarts to get them
- # max 100 service accounts per project
- # run gcloud init --console-only first and select a project
- #
- # Want to use these for rclone? Service Account Loadbalancing is implemented in this build:
- # https://git.fionera.de/fionera/rclone/releases
- KEYS_DIR=~/keys
- for name in service{1..100}; do
- echo $name
- gcloud iam service-accounts create $name
- done
- for name in $(gcloud iam service-accounts list --format='value(email)'); do
- echo $name
- gcloud iam service-accounts keys create $KEYS_DIR/$name.json --iam-account=$name
- done
- gcloud iam service-accounts list --format='value(email)'
Advertisement
Add Comment
Please, Sign In to add comment