feat(ec2): adding placementGroup to LaunchTemplateProps and LaunchTemplate#33726
Conversation
placementGroup to LaunchTemplateProps and LaunchTemplate
Signed-off-by: Clay Rosenthal <[email protected]>
bd10ce0 to
cfe1a67
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33726 +/- ##
=======================================
Coverage 82.38% 82.38%
=======================================
Files 120 120
Lines 6955 6955
Branches 1173 1173
=======================================
Hits 5730 5730
Misses 1120 1120
Partials 105 105
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| userData: userDataToken, | ||
| metadataOptions: this.renderMetadataOptions(props), | ||
| networkInterfaces, | ||
| placement: props.placementGroup ? { |
There was a problem hiding this comment.
is there any correlation with the placement strategy that we can use currently for this property in CDK ??
eg. we can only use this with strategy type CLUSTER etc.
There was a problem hiding this comment.
What placement strategy? There's no other placement property for launch templates in CDK
There was a problem hiding this comment.
Thanks @clayrosenthal , seeing the difference in unit test and integration test where in unit test we have the strategy defined as
strategy: PlacementGroupStrategy.CLUSTER,
but in integration test we used
strategy: ec2.PlacementGroupStrategy.SPREAD,
confirming for my understanding, that we can indeed support all possible type for this while passing the placement group to launch template.
There was a problem hiding this comment.
It should support whatever LaunchTemplates already support
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #33721
Reason for this change
To allow for passing
PlacementGroups toLaunchTemplatesDescription of changes
Adding
placementGrouptoLaunchTemplateProps. I chose to only implement this part of theplacementfield in LaunchTemplates, not doing anything with dedicated hosts or the like, as those don't have any CDK constructs. This change enables creating aPlacementGroupand passing it to aLaunchTemplateDescribe any new or updated permissions being added
None
Description of how you validated changes
Added a unit test, ran the existing tests as well.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license