9

I understand that AWS Elastic Beanstalk only needs a single configuration file in the .elasticbeanstalk directory, but (1) when I run eb config I get an additional file, myenv.env.yml; and (2) my IDE threats additional files as important to push, by placing

!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml 

in my project's .gitignore.

What are these additional files and what role do they play? My understanding was that only config.yml mattered, and that only it had any effect.

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418

1 Answers1

12

The myenv.env.yml file is intended to be a temporary file. eb config creates it, then you edit it, save it, and exit the editor. Once the editor is closed, the CLI updates the environment and the file gets deleted.

As for the second part of your questions, the sections in .gitignore are intended for those who want to check in their configurations. For example, lets say you have a config.yml file. But you want other developers on your team to use a standard version of the file. You can create (or rename your current file) a file called config.global.yml and it will work exactly like config.yml except it can be checked in to version control.

If you have a config.global.yml and a config.yml the config.yml will always take precedence over any overlapping settings.

Nick Humrich
  • 14,905
  • 8
  • 62
  • 85
  • So when I "Write Out" (or when I "Exit" and choose Y) the environment is updated? I got thrown off because I ended up with the file hanging around after I'd exited the editor, and it wasn't clear to me when my changes were applied to the environment (and whether I needed to keep the file around to make them happen). – orome Jan 20 '15 at 22:13
  • Not sure what you mean by "write out". What text editor are you using? – Nick Humrich Jan 20 '15 at 22:15
  • Looks line nano (where is that configured; is `eb` just picking up some system setting)? – orome Jan 20 '15 at 22:16
  • So in nano you just hit ctrl x and save the file. Then the cli hould be deleting the file. You can change your environment variable EDITOR to whatever editor you want to use. – Nick Humrich Jan 20 '15 at 22:26
  • So Ctl+X (and YES) is enough to update the environment (and shouldn't leave a file around after)? – orome Jan 20 '15 at 22:29
  • Yes, that should be sufficient. – Nick Humrich Jan 20 '15 at 22:52
  • I have another question about [how to best restrict traffic to load balanced EB environments](http://stackoverflow.com/q/28459626/656912). – orome Feb 11 '15 at 16:45
  • 2
    This config.yml vs config.global.yml thing doesn't seem to be too well documented :/ One related link to AWS forum (with AWS employee anser): [Options for sharing config in git with EB CLI v3?](https://forums.aws.amazon.com/thread.jspa?messageID=588661) – Touko Oct 06 '15 at 10:47