Passing environment variables to Managed VM instances

708 Views Asked by At

How can I pass environment variables to Managed VM instances on Google App Engine? Is it possible?

2

There are 2 best solutions below

3
On BEST ANSWER

There are 2 places you can set Environmental Variables for Managed VM instances:

That is the order of precedence as well.

Now it sounds like you already have a Dockerfile and you don't want to alter it to run in Managed VM's. But you will have to add a app.yaml to get your setup to work with Managed VM's, so add your environmental variables to your app.yaml like so:

env_variables:
  TESTENV: 'setinappyaml 
0
On

If you're running completely locally it won't work. You have to run via the sdk, otherwise the app.yaml isn't even part of the equation.