-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-autoscaling): notificationTarget shouldn't be compulsory in LifecycleHook #14641
Comments
Sorry for the long reply here, You're right. This isn't required from the Cfn side of things, so the L2 construct could have aws-cdk/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts Lines 104 to 115 in 32f00eb
I'm not sure why this is required in the first place, but I can't find a reason for making it required |
…ecycleHook (#16187) This makes the notificationTargetArn optional in LifecycleHook. CloudFormation docs specify it as optional [here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html). Closes #14641. To achieve this, the `role` parameter was made optional. To avoid breaking users, a role is provided if users specify a `notificationTarget` (which they currently all do, as it is a required property) and is not provided otherwise. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…ecycleHook (aws#16187) This makes the notificationTargetArn optional in LifecycleHook. CloudFormation docs specify it as optional [here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html). Closes aws#14641. To achieve this, the `role` parameter was made optional. To avoid breaking users, a role is provided if users specify a `notificationTarget` (which they currently all do, as it is a required property) and is not provided otherwise. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The
notificationTarget
property can be unset and by default it will be able to use CWE to deliver Autoscaling Group notifications.ASG API - https://docs.aws.amazon.com/cli/latest/reference/autoscaling/put-lifecycle-hook.html , keeps
[--notification-target-arn <value>]
as an optional param.I was able to use L1 construct -
CfnLifecycleHook
as such without providing thenotificationTarget
Reproduction Steps
Documentation shows property is mandatory - https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-autoscaling.LifecycleHook.html
What did you expect to happen?
notificationTarget should be optional or should have a way to use the default CWE integration.
What actually happened?
Could not use CWE integration which is how aws-node-termination-handler needs to be configured
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: