Hi!
I’m actually trying to figure out how to use the log driver configuration so I can forward the logs to our self-hosted FluentD instance, instead of using CloudWatch Logs.
The problem is that it seems “impossible” to configure it using the “Deploy Amazon ECS Service” step template because it’s missing the firelensConfiguration flag inside the Container Definitions options.
The first configuration that I’ve tried was setting only the application container inside the Container Definitions block.
Then, I used the “Customise log options” inside “Log Configuration”, changed the “Log Driver” to “awsfirelens” and set some parameters inside the “Log Options” block (setting the “Name”, “Host”, “Port”, “Retry_Limit” and “Tag” parameters).
The response I get when I run this is an error message from CloudFormation:
Resource handler returned message: "Invalid request provided: Create TaskDefinition: When awsfirelens log driver is specified in log configuration, a firelens configuration object must be configured in one of the containers.
And it makes sense, because I didn’t configure the log_router container inside my Container Definitions block. But that’s when things get weird…
So, I looked into some examples from AWS to define that log_router container: (https://github.com/aws-samples/amazon-ecs-firelens-examples/blob/mainline/examples/fluent-bit/forward-to-aggregator/task-definition.json)
As the example specifies, I need to specify the log_router container that uses the amazon/aws-for-fluent-bit:stable image and has a firelensConfiguration block with the parameter type set to fluentbit.
The problem is: with the current official Step Template from Octopus Deploy, there is no option to set that firelensConfiguration block.
This looks like a bug. Without being able to configure that block, the entire Log Configuration block is useless as you can only use CloudWatch Logs to send logs.