aws-ecs: 'ContainerDefinitionOption' supports mountPoints property
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
[ContainerDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html) has mountPoints property, but [ContainerDefinitionOption](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinitionOptions.html) doesn't have it. Off course, We can add mount points by [ContainerDefinition.addMountPoints](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html#addwbrmountwbrpointsmountpoints), but it's a little useful to be able to set mount points in [TaskDefinition.addContainer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.TaskDefinition.html#addwbrcontainerid-props)
### Use Case
I'd like to set mount points in TaskDefinition.addContainer
### Proposed Solution
Add a new property mountPoints [here](https://github.com/aws/aws-cdk/blob/v2.156.0/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts#L103).
### Other Information
Error message with trying to set mountPoints in TaskDefinition.addContainer
```
lib/cdk-stack.ts:188:4 - error TS2353: Object literal may only specify known properties, and 'mountPoints' does not exist in type 'ContainerDefinitionOptions'.
```
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.154.1
### Environment details (OS name and version, etc.)
Ubuntu 22.04.4 LTS
Contributor guide
Research direction
Start in packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts at ContainerDefinitionOptions and trace TaskDefinition.addContainer. Confirm how mountPoints is represented on ContainerDefinition, then make it accepted through the options object and verify that passing mountPoints to addContainer no longer produces TS2353 and preserves the requested mount points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100