empire
empire copied to clipboard
Allow inlining environment variables in Custom::ECSTaskDefinition resource
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.