compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
158 stars 16 forks source link

[BUG] service.deploy.labels: ecs.ephemeral.storage not working #719

Closed thorfi closed 7 months ago

thorfi commented 7 months ago

Bug

service.deploy.labels: ecs.ephemeral.storage does not result in the correct TaskDefinition.EphemeralStorage.SizeInGiB

Steps to reproduce the behavior:

  1. pip install
  2. cli
  3. Docker compose file
    services:
    foo:
    deploy:
      labels:
        ecs.ephemeral.storage: 200
  4. Output CloudFormation file foo.yaml
    EcsTaskDefinition:
    Properties:
      ...
      EphemeralStorage:
        Ref: AWS::NoValue
      ...
    Type: AWS::ECS::TaskDefinition

Expected behavior

Output CloudFormation file foo.yaml

  EcsTaskDefinition:
    Properties:
      ...
      EphemeralStorage:
        Fn::If:
          - UseFargate
          - SizeInGiB: 200
          - Ref: AWS::NoValue
      ...
    Type: AWS::ECS::TaskDefinition

Logs

N/A

Desktop

thorfi commented 7 months ago

PR coming for this one shortly

JohnPreston commented 7 months ago

Hey @thorfi Thanks for reporting this. I use this label all the time in other services, and this works fine. However, I did notice that it doesn't work for a singleton service (ECS family with a single service). So I'll be looking into that.