Skip to content

proposal: add Task Definition Overrides #2588

@iamhopaul123

Description

@iamhopaul123

Background

As more customers are using Copilot, our current manifest might not meet all their needs. For example in #2101, customers want http.credential to be configurable so as to support private repositories. Also as stated in one of our top issues with the most thumb-ups #948, it would be very helpful if they could overwrite arbitrary fields in their task definitions.

Example Related Issues

UX Design

For specific fields to override, please refer to https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskDefinition.html

taskdef_override:
  - path: ContainerDefinitions[0].Ulimits.HardLimit
    value: 1024
  - ContainerDefinitions[0].Ulimits.Name: some limit
  - ContainerDefinitions[0].Ulimits.SoftLimit: 512
  - RequiresCompatibilities: [FARGATE]

Restriction

Users will not be allowed to modify the following fields in the task definition

  • Family
  • ContainerDefinition.Name (our main container name)

Override Behaviors

  • For single-value options like bool, string, or int, the new value replaces the old value.
  • For multi-value options like list or map, Copilot concatenates both sets of values.

Milestones

  • new override package (subject to future changes), which
    • validate the override rule
    • translates the override rule
    • applies override rules to the unmarshalled CFN template
    • unmarshals and marshals the CFN template correctly
  • read the override section in the manifest package
  • apply the template override in stack pkg
  • add docs and integ tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/designIssues that are design proposals.

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions