amazon-ecs-cli icon indicating copy to clipboard operation
amazon-ecs-cli copied to clipboard

ecs-cli should warn the user if ecs-params service contains unknown entries

Open toredash opened this issue 6 years ago • 0 comments

If you use a compose file which define a service A, and in ecs-params.yml you define a service B, ecs-cli does not warn the user that something might not be correct with the compose and params file.

Summary

ecs-cli v.1.12.1

Example compose file:

version: '3'
services:
  serviceA:
    image: X/X:$TAG
    env_file:
      - ../env
    ports:
      - 80
    logging:
      driver: awslogs
      options:
        awslogs-group: X/$LOG_GROUP_NAME
        awslogs-region: $AWS_REGION
        awslogs-stream-prefix: "ecs"
        awslogs-create-group: "true"

Example ecs-param.yml file:

version: 1
task_definition:
  task_size: 
    cpu_limit: 256
    mem_limit: 512
  services:
    serviceB:
      essential: true
      cpu_shares: 256
      mem_limit: 384

When running ecs-cli compose --project-name X create there is no indication that anything is wrong: INFO[0000] Using ECS task definition TaskDefinition="X:5"

Expected Behavior

I would expect ecs-cli to fail or warn the user if ecs-params.yml file contains services that is not present in compose file.

toredash avatar Feb 18 '19 19:02 toredash