HUB
Sign inSign up
google-cloud-eval-secret logo

igops/google-cloud-eval-secret

By igops

•Updated almost 4 years ago

Image
0

1.1K

igops/google-cloud-eval-secret repository overview

⁠A narrowly specialized docker image for evaluating the contents of Google Cloud Secrets

E.g., consider having a Google Cloud Secret with id secret-id in project my-project and value echo 123. Then, running

$ docker run -it -e SECRET_PROJECT=my-project -e SECRET_ID=secret-id igops/google-cloud-eval-secret:latest

will do the following:

  1. You will be asked to authorize using gcloud CLI
  2. If you have access to the secret, its latest version will be loaded and evaluated so that 123 will be sent to STDOUT.

Sometimes, it might be a handy way of securely sharing some gcloud scripts. E.g., you even can put a gcloud compute ssh command inside your secret, and it will work if a user has the corresponding permissions.

Restarting the same container will preserve your credentials:

$ docker run -it --name secret-eval -e SECRET_PROJECT=my-project -e SECRET_ID=secret-id igops/google-cloud-eval-secret:latest
... authorizaion
... evaluation
... exit
$ docker start -i secret-eval
... authorizaion is preserved, so it's skipped
... evaluation
... exit

⁠ENV variables

VariableDescription
SECRET_PROJECTGoogle Cloud Project ID to load a secret from
SECRET_IDSecret ID
SECRET_VERSIONSecret version, default is latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:74b68e549…
Size
208.2 MB
Last updated
almost 4 years ago
docker pull igops/google-cloud-eval-secret:latest