1

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?

Almad
  • 5,753
  • 7
  • 35
  • 53
  • Have you reviewed the project's cloudformation file? The configuration may be modeled within the CFn file and is therefore being overwritten on every deployment. – Doug Apr 01 '20 at 04:00
  • There is configuration, but I have no idea how to prevent it from removing the excess configuration or how to prevent cloudstar from generating such cloudformation file. – Almad Apr 04 '20 at 12:32

0 Answers0