Search code examples
python-2.7google-app-enginegoogle-cloud-endpoints

Set env-var at time of deployment google app engine


I have a endpoint application so therefore when i deploy endpoints configuration to google cloud i get a service name and configuration id each time i deploy which i need to set as environment variable at the time of deployment of my app-engine project in app.yaml

app.yaml

env_variables:
  ENDPOINTS_SERVICE_NAME: [project-id].appspot.com
  ENDPOINTS_SERVICE_VERSION: 2017-12-28r0

so instead of specifying it in app.yaml can i specify in command line at the time of deployment?

I tried to see any such flag or command line argument in gcloud but was not able to find


Solution

  • No, it needs to be in the app.yaml. That is how the running app gets its environment variables.