Skip to content

aws_ecs: L2 support for restartpolicy #31425

@raoz

Description

@raoz

Describe the feature

The RestartPolicy L1 construct is now available https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnTaskDefinition.RestartPolicyProperty.html, but it cannot be conveniently set up using L2 ContainerDefinition.

Use Case

I use L2 constructs for setting up ECS services and need to set the restart policy for a container.

Proposed Solution

Add restartPolicy field to ContainerDefinition.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.158.0

Environment details (OS name and version, etc.)

Typescript

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ecsRelated to Amazon Elastic Containereffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions