4

My EB environment has some environment variables that I have set through the AWS web console. However, I'm now looking to have these env variables be set through ebextensions.

The problem is that it doesn't look like I am able to overwrite the variables that I initially set through the AWS web console.

Overwriting env vars that were explicitly set by ebextensions is fine, though.

Here's how my ebextensions file looks:

option_settings:
  aws:elasticbeanstalk:application:environment:
    oldVar: updatedTestValue
    newVar: newValue

newVar updates whenever I update my ebextensions file. However oldVar, which is a var I set through the console, refuses update.

Any thoughts on how I can have ebextensions work as desired? I'd really like to avoid a scenario where I have to remove my previously-set env vars and quickly deploy an update with the ebextensions changes. Thanks.

Bbbbob
  • 415
  • 2
  • 6
  • 10

1 Answers1

4

According to the docs on precedence, it seems that if you have set an environment variable using the console (or the API/SDK in general) then that value will take precedence over a value from .ebextensions. Unfortunately this implies that you will have to remove your previously set variables from the console and include them in your ebextensions instead.

danimal
  • 1,567
  • 13
  • 16