-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Apologies as I'm trying to navigate using pybritive and it's been a little rocky. I'm trying to script something like a setup script for our environment where users read a bunch of secrets from GCP requiring a profile checkout, and then check back in.
Currently, my understanding of the flow is:
- pybritive checkout " -t -m gcloudauth
- pipe the result of that to sh to active the service account
- run gcloud commands
- pybritive checkin " -m gcloudauth
- grep out the service account name and
gcloud auth revoke <SA>to reset the gcloud environment
I'd love to make two requests that I know might be a little hard, but would greatly complement this user flow:
-
deeper integration with gcloudauth. Piping the setup command is semi-trivial, but it seems like on the backend, checkin should provide the cleanup command
a) alternatively, it'd be great if the checkout command and checkin command automatically handled resetting the default account to the user's local default (since otherwise we have to remember and manage that). In short, pybritive should be a wrapper around running some commands where it temporarily enchances gcloud, and then at the end resets and cleans up -
pybritive clear gcloud-auth-key-filesshould accept a -t command, otherwise it just throwsError: No tenants found in /Users/charlie.croom/.britive/pybritive.config. Cannot continue.. If I can specify -t in all the other commands, it should work here (also I'm not sure why that prevents cleaning up local files anyways)
Thanks for reading :) A little sad the JS library is going away since that could have been easier to integrate into our JS scripts...but I know y'all are probably just trying to make it work. Appreciate ya!