What is the best practice for managing environment variable configuration files for git repositories with multiple environment branches that are deployed to different environments on Elastic Beanstalk using "eb deploy"?
I have a git repository with prod and dev branches, and EB set up with prod and dev environments, and an environment config file for each env (env.config for prod, and env_dev.config for dev). The env files are in .gitignore, but not in .ebignore, so they are not in source control, but are deployed to EB.
How can I set this up so that env.config is only deployed to production, and env_dev.config is only deployed to dev? I asked AWS support, and they said there is no way to have a conditional on the environment level that would tell it what config file to include.
Another idea was having an .ebignore file in each branch that ignored the env.config file of the other branch, but when I merged development branch to production, this file would come too.