Skip to content

[BUG] x-logging tags not propagating #820

@DonIsiko

Description

@DonIsiko

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:

  1. Install ECS ComposeX (example, adjust as appropriate):

    • Installed via pip install ecs-composex
  2. Execute ECS ComposeX as a CLI tool:

    ecs-composex -f docker-compose.yml deploy
  3. 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.)

  4. Deploy the stack and inspect the CloudWatch Log Group created for service-name in AWS.

  5. 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions