While using Google Cloud Code extension in VS Code, how to setup environment variables after launch.json is created by "Run on Cloud Run Emulator" command?
Reference: https://cloud.google.com/code/docs/vscode/develop-service
#cloud-code-vscode
I ended up clearing launch.json
file and redoing "Run on Cloud Run Emulator" command in vscode.
I entered the key:value
pairs in Environment Variables section in "Advanced Service Settings"
This added an env section in launch.json
with the values.
"service": {
"name": "abc-cloud-run",
"containerPort": 8080,
"env": [
{
"name": "PORT",
"value": "8080"
},
{...}