Describe the feature
You should be able to pass a PlacementGroup construct to the LaunchTemplate construct to make the instances launched with that template use that placement group.
Use Case
When you define a PlacementGroup and want to create a LaunchTemplate that uses it, you have to use the L1 CfnLaunchTemplate or do some weird half and half of creating an L2 LaunchTemplate then casting it as the L1 to edit the corresponding property.
Proposed Solution
Allow for an optional placementGroup prop that implements IPlacementGroup in LaunchTemplateProps
Other Information
The Instance construct already supports such a prop
Acknowledgements
CDK version used
2.178.2
Environment details (OS name and version, etc.)
macOS 15.3.1 (24D70)
Describe the feature
You should be able to pass a
PlacementGroupconstruct to theLaunchTemplateconstruct to make the instances launched with that template use that placement group.Use Case
When you define a PlacementGroup and want to create a LaunchTemplate that uses it, you have to use the L1
CfnLaunchTemplateor do some weird half and half of creating an L2LaunchTemplatethen casting it as the L1 to edit the corresponding property.Proposed Solution
Allow for an optional
placementGroupprop that implementsIPlacementGroupinLaunchTemplatePropsOther Information
The
Instanceconstruct already supports such a propAcknowledgements
CDK version used
2.178.2
Environment details (OS name and version, etc.)
macOS 15.3.1 (24D70)