Platforms
Envlet on Google Cloud
Cloud Run and Cloud Functions take ENVLET_TOKEN as one variable. Everything else comes from Envlet at boot.
Set the token
gcloud run services update api \
--update-env-vars ENVLET_TOKEN=envlet_...Inject at boot
from envlet import inject
inject()Set up
- 01
Create a token
Create an identity for Google Cloud and a token for the environment it deploys.
- 02
Set one secret
Set ENVLET_TOKEN on the Cloud Run service or function. Use --update-secrets to source it from Secret Manager if your policy requires it.
- 03
Start through Envlet
Inject at the top of your entrypoint before the framework reads settings.
Questions
- Will my app start if Envlet is down?
- No, and that is the point. It retries for a few seconds, then fails so you notice, instead of starting with half an environment.
- Do I still need Google Cloud's own secret store?
- Only for ENVLET_TOKEN. Everything else lives in Envlet, so you rotate in one place.