Describe the bug
When defining x-logging for a service, the Properties.Tags configuration is not propagated to the CloudWatch Log Group created by ECS ComposeX.
Given the following configuration:
services:
service-name:
x-logging:
RetentionInDays: 30
Properties:
Tags:
- Name: key
Value: "some-value"
I expect the CloudWatch Log Group created for service-name to have the tag key=some-value applied in addition to any global tags set via x-tags.
In practice, the value under Properties.Tags appears to be ignored entirely and is not present on the resulting CloudWatch Log Group.
To Reproduce
Steps to reproduce the behavior:
-
Install ECS ComposeX (example, adjust as appropriate):
- Installed via
pip install ecs-composex
-
Execute ECS ComposeX as a CLI tool:
ecs-composex -f docker-compose.yml deploy
-
Use a docker-compose.yml (or equivalent) with a service configured as follows:
services:
service-name:
x-logging:
RetentionInDays: 30
Properties:
Tags:
- Name: key
Value: "some-value"
(Plus any required x-tags / x-cluster / x-vpc etc. to allow deployment.)
-
Deploy the stack and inspect the CloudWatch Log Group created for service-name in AWS.
-
Observe that:
- Global tags from
x-tags are applied as expected.
- The tag
key=some-value from x-logging -> Properties -> Tags is not present on the Log Group.
Expected behavior
The CloudWatch Log Group created by ECS ComposeX for the service should have both:
- All global tags defined via
x-tags, and
- Any additional tags defined under
x-logging -> Properties -> Tags for that specific service.
In other words, Properties.Tags should be merged with (or added in addition to) the global tags, not ignored.
Logs
There are no explicit errors in ECS ComposeX output related to logging or tags. The deployment completes successfully and the log group is created, but without the tag(s) provided in x-logging -> Properties -> Tags.
Desktop:
- OS:
Ubuntu 22.04
- Python version:
3.11
- ECS ComposeX branch:
1.1.9
Describe the bug
When defining
x-loggingfor a service, theProperties.Tagsconfiguration is not propagated to the CloudWatch Log Group created by ECS ComposeX.Given the following configuration:
I expect the CloudWatch Log Group created for
service-nameto have the tagkey=some-valueapplied in addition to any global tags set viax-tags.In practice, the value under
Properties.Tagsappears to be ignored entirely and is not present on the resulting CloudWatch Log Group.To Reproduce
Steps to reproduce the behavior:
Install ECS ComposeX (example, adjust as appropriate):
pip install ecs-composexExecute ECS ComposeX as a CLI tool:
Use a
docker-compose.yml(or equivalent) with a service configured as follows:(Plus any required
x-tags/x-cluster/x-vpcetc. to allow deployment.)Deploy the stack and inspect the CloudWatch Log Group created for
service-namein AWS.Observe that:
x-tagsare applied as expected.key=some-valuefromx-logging -> Properties -> Tagsis not present on the Log Group.Expected behavior
The CloudWatch Log Group created by ECS ComposeX for the service should have both:
x-tags, andx-logging -> Properties -> Tagsfor that specific service.In other words,
Properties.Tagsshould be merged with (or added in addition to) the global tags, not ignored.Logs
There are no explicit errors in ECS ComposeX output related to logging or tags. The deployment completes successfully and the log group is created, but without the tag(s) provided in
x-logging -> Properties -> Tags.Desktop:
Ubuntu 22.043.111.1.9