4

I have a Golang application deployed to Google App Engine Flex which has a lot of environment variables. Now and then, I need to change a couple of these environment variable to test my application. However, I could not find a way in GAE Flex Console, where I can change the variables and restart the app. Every time I need to change a variable, I have to do this in app.yaml and re-deploy the app, which is cumbersome and kills a lot of time.

Is there a way to change the environment variable of an application in GAE Flex console, without redeploying it? I used similar thing in Pivotal Cloud Foundry, which is quite neat. After all, that's why anybody keep environment variables in an app, which can be set to different values as and when required.

Any help or pointers is highly appreciated.

Update: No specific info on the asked topic is available in GCP docs or in SO. The following question in SO says its not possible: Google App Engine Flexible - environment variables

Saurav Haloi
  • 343
  • 1
  • 2
  • 11
  • No, it's not possible, as you mentioned. A possible workaround for it would be writing a routine in Go (no expertise in Go, so I don't know if it's possible) that checks a file in Cloud Storage every once in a while, and you set the variables based in that file. Again, this is the first thing that I thought of. Either that or deploy those new version with the flag that doesn't stop the app, just in case, to at least avoid downtime. – Mangu Aug 23 '18 at 17:19

1 Answers1

2

Unfortunately, no. You have to "gcloud app deploy" again whenever you make a change such as updating a environmental variable in the app.yaml.

Ying Li
  • 2,500
  • 2
  • 13
  • 37