How to retain modified environment variables in elastic beanstalk with CodeStar

176 Views Asked by At

I set up a new project using AWS Code Star and I want to pass in environment variables in order to connect to database. When I do that using UI, variables are set correctly and upon reload, application works.

However, after pushing code into the repository and letting Beanstalk deploy it, all newly set application variables are lost.

If I add the environment variables into .ebextensions/django.config like this:

option_settings:
  aws:elasticbeanstalk:application:environment:
      DB_HOST: placeholder

then the listed environment variables are replaced with their placeholder value.

How do I retain modified environment variables so I don't have to commit secrets to the repository?

0

There are 0 best solutions below