Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ecs): unclear docs on valid ec2 task definition placement constra…
…ints and no validation of input #25933 (#26384) Docs were unclear on valid placement constraints. You can specify distinctInstances when creating a Service, or running a task. You can specify memberOf when doing the previous two actions, or when creating a task or new revision. So far only memberOf is valid for ec2 task definitions. This pull request enhances the documentation and validation for task definition placement constraints in the aws-cdk-lib/aws-ecs package. The documentation now includes a note clarifying the valid placement constraints and a new validatePlacementConstraints method has been added to the Ec2TaskDefinition class to validate the constraints at synth time. The changes include: Enhancement of documentation in ec2-task-definition.ts to include a note about valid placement constraints. Addition of the validatePlacementConstraints method in ec2-task-definition.ts to validate placement constraints at synth time. Addition of unit tests in ec2-task-definition.test.ts to verify the correct behavior of the new validatePlacementConstraints method. Addition of integration tests to ensure overall functionality. Closes #25905. Revival of #25933 ---- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
- Loading branch information