josef.van.niekerk
josef.van.niekerk

Reputation: 12121

Elastic Beanstalk command line keeps changing optionsettings file

I'm trying to set

SecurityGroups=security_group

inside my .elasticbeanstalk/optionsettings.environment file, but everytime I run either eb start or eb stop the setting is removed.

The only point where it works is when I add the setting, and run eb update, but why on earth does my settings file get changed otherwise?

Upvotes: 2

Views: 292

Answers (2)

rogerger
rogerger

Reputation: 1

ElasticBeanstalk-CLI-2.6.4/eb/linux/python2.7/scli/const.py has the following already defined:

LocalOptionSettings = {                                                                                                           
u'aws:autoscaling:launchconfiguration' : {                                                                                    
    u'EC2KeyName',                                                                                                            
    u'InstanceType',-                                                                                                                                                                                 
}, 

If you put other properties in your aws:autoscaling:launchconfiguration Resource, it will get removed automatically by eb. I wonder if this is by design.

Upvotes: 0

dangerousdave
dangerousdave

Reputation: 6408

For an explanation of this behaviour, please see this thread.

If you want to set environment variables, I suggest you do so though .config files in your .ebextensions folder. Please start here for further information.

Upvotes: 2

Related Questions