Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_ecs: L2 support for restartpolicy #31425

Closed
2 tasks
raoz opened this issue Sep 12, 2024 · 7 comments
Closed
2 tasks

aws_ecs: L2 support for restartpolicy #31425

raoz opened this issue Sep 12, 2024 · 7 comments
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@raoz
Copy link

raoz commented Sep 12, 2024

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

@raoz raoz added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Sep 12, 2024
@ashishdhingra ashishdhingra self-assigned this Sep 12, 2024
@ashishdhingra
Copy link
Contributor

RestartPolicy was added in L1 construct as a result of CFN schema change, refer #31127 and CfnTaskDefinition.ContainerDefinitionProperty. This should now be supported in L2 construct.

@ashishdhingra ashishdhingra added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 12, 2024
@go-to-k
Copy link
Contributor

go-to-k commented Sep 13, 2024

The PR has been submitted. It is now awaiting review.

#31228

@toplac
Copy link

toplac commented Sep 20, 2024

Hey @go-to-k do you have any idea when this PR is ready to be merged?
We are eagerly awaiting this feature

@go-to-k
Copy link
Contributor

go-to-k commented Sep 20, 2024

Right now I'm waiting for a review and I don't know when it will be reviewed as it depends on the status of the team. I can't wait either.

If we get more reactions to this issue, it will be prioritized.

mergify bot pushed a commit that referenced this issue Sep 24, 2024
### Issue # (if applicable)

Closes #31127 #31425.

### Reason for this change



A restart policy can be specified in CloudFormation, but not in L2.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html

### Description of changes



Add `enableRestartPolicy` and some properties to the container definition.

### Description of how you validated changes



unit tests and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@go-to-k
Copy link
Contributor

go-to-k commented Sep 25, 2024

The PR has been merged!

@gracelu0
Copy link
Contributor

gracelu0 commented Oct 8, 2024

Thank you for your PR! Closing this issue as the PR has been merged.

@gracelu0 gracelu0 closed this as completed Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

5 participants