I know how to set environment variables in Cloud Run using the web console (https://cloud.google.com/run/docs/configuring/environment-variables#setting), but how can I do this locally in the emulator when using VSCode with the Cloud Code extension?
I've only seen how to do it on the initial run (https://youtu.be/EtMIEtLQNa0?t=307) but not on subsequent runs. The advanced settings window no longer shows up when I rerun the command.
UPDATE:
There's also this explanation (of the same thing) here https://cloud.google.com/code/docs/vscode/develop-service, but I think this adds the settings to launch.json
(?) which gets committed to git.
I tried adding a .env
file but process.env.MY_VARIABLE
is undefined.