empire icon indicating copy to clipboard operation
empire copied to clipboard

Allow inlining environment variables in Custom::ECSTaskDefinition resource

Open ejholmes opened this issue 8 years ago • 0 comments

If an app has a large number of entries in the Procfile, it's possible to hit the limit on the number of resources in the template (200). Right now (when using the Custom::ECSTaskDefinition resource), for every task definition that gets created, we also create a Custom::ECSEnvironment with the process specific environment variables, then pass the ref's down:

containerDefinition.Environment = []interface{}{
        Ref(appEnvironment),
        Ref(processEnvironment),
}

This could just be inlined in the ECSTaskDefinition instead:

containerDefinition.Environment = []interface{}{
        Ref(appEnvironment),
        {
                "Name": "EMPIRE_PROCESS",
                "Value": "Web",
        }
}

This would remove 1 CloudFormation resource for every entry in the procfile.

ejholmes avatar Mar 09 '17 23:03 ejholmes