Last active
December 9, 2022 15:16
-
-
Save mjroeleveld/e834ef9eb857dfdf6e97a9567925d8ae to your computer and use it in GitHub Desktop.
Restore default GCP service accounts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT=project | |
PROJECT_NUMBER=1343214123423 | |
# GKE | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:service-$PROJECT_NUMBER@container-engine-robot.iam.gserviceaccount.com --role=roles/container.serviceAgent | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:service-$PROJECT_NUMBER@containerregistry.iam.gserviceaccount.com --role=roles/editor | |
# Compute | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:[email protected] --role=roles/editor | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:[email protected] --role=roles/compute.serviceAgent | |
# APIs | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:[email protected] --role=roles/editor | |
# Cloud Build | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:[email protected] --role=roles/cloudbuild.builds.builder | |
# App Engine | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:[email protected] --role=roles/editor | |
gcloud projects add-iam-policy-binding $PROJECT --member=serviceAccount:service-$PROJECT_NUMBER@gae-api-prod.google.com.iam.gserviceaccount.com --role=roles/appengineflex.serviceAgent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This saves my day ❤️