- 
                Notifications
    You must be signed in to change notification settings 
- Fork 176
Open
Labels
Description
When chamber is used to populate environment variables into a Elastic Container Services (ECS) task, you are able to add environment variables to the command using containerOverrides:
{
  "containerOverrides": [
    {
      "name": "string",
      "command": ["chamber","exec","<service>" ...],
      "environment": [
        {
          "name": "CLOBBERED_BY_CHAMBER",
          "value": "oops"
        }
        ...
      ]
    }
    ...
  ],
  "taskRoleArn": "string"
}However, if you are running a chamber command these environment variables are overwritten if they exist in the service.
It would be good to be able to do:
chamber exec --noclobber <service>And have chamber not overwrite and environment variables that are already set. An update to the way 'collisions' are handled in the code should achieve this.
To this end, --noclobber sits alongside the existing --pristine and --strict switches and should not be used with them as it works in the opposite way:
- --strictand- --noclobber- Should raise an error, these switches do pretty much the opposite of each other,- --strictrequiring the variables be set and- --noclobbertelling chamber not to overwrite them
- --pristineand- --noclobber- Should also error,- --noclobberis allowing existing values to come through,- --pristineexplicitly prevents them from being inherited
bpottier