Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(codedeploy): termination hook (#30644)
### Issue # (if applicable) None ### Reason for this change Deployment group supports a termination hook for EC2 compute type but CDK L2 construct does not support this. ### Description of changes Added `terminationHook` to `ServerDeploymentGroupProps` ```ts new codedeploy.ServerDeploymentGroup(stack, 'DeploymentGroup', { autoScalingGroups: [ new autoscaling.AutoScalingGroup(stack, 'ASG', { instanceType: ec2.InstanceType.of(ec2.InstanceClass.STANDARD3, ec2.InstanceSize.SMALL), machineImage: new ec2.AmazonLinuxImage(), vpc: new ec2.Vpc(stack, 'VPC'), }), ], terminationHook: true, // add }); ``` ### Description of how you validated changes Added both unit 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*
- Loading branch information