Skip to content

Instantly share code, notes, and snippets.

View u9g's full-sized avatar
💯
on my grind!

u9g

💯
on my grind!
View GitHub Profile
@u9g
u9g / create_service.sh
Created March 2, 2019 01:24 — forked from DashLt/create_service.sh
Quickly make 100 service accounts and generate keys for them
#!/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
KEYS_DIR=keys
for name in service{1..100}; do echo $name; done | parallel --citation -j100 gcloud iam service-accounts create {}
for name in $(gcloud iam service-accounts list --format='value(email)'); do echo $name; done | parallel --citation -j100 gcloud iam service-accounts keys create $KEYS_DIR/{}.json --iam-account={}
@u9g
u9g / create_service.sh
Created March 5, 2019 02:32 — forked from The-OMG/create_service.sh
Small script for creating Google Cloud Service Accounts
#!/bin/bash
# requires gcloud command line tools
# go to https://cloud.google.com/sdk/docs/quickstarts to get them OR you can install with Node (npm) "npm install --save -g @google-cloud/cloud-sdk"
# max 100 service accounts per project
# run "gcloud init --console-only" first and select a project; run it again to select another project to create more service accounts
# Location of where service account keys will be created
KEYS_DIR=keys