-
Notifications
You must be signed in to change notification settings - Fork 4k
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_elasticloadbalancingv2]: Target Group 'slowStart' option can't be disabled #29437
[aws_elasticloadbalancingv2]: Target Group 'slowStart' option can't be disabled #29437
Comments
According to the doc:
I think we should fix it here to allow explicitly aws-cdk/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts Lines 333 to 335 in 5b910f0
|
I'll take this. |
|
Describe the bug
When you set slowStart attribute on a Target Group it sets this property correctly in the CFN template:
Template:
But when trying to remove this setting by just removing slowStart attribute, CDK removes the synthesized attribute from the CFN template but the actual ElbV2 Target Group resource is not changed.
In the docs the default value would be set to "0" (disabled) but it doesn't accept anything outside the 30-900 range:
Error: Slow start duration value must be between 30 and 900 seconds.
The only way to disable it is by directly changing the Target Group Attributes from AWS Console/CLI.
Expected Behavior
Slow Start attribute removed from the ElbV2 Target Group by either removing 'slowStart' option from the construct's properties or by setting it to "0" (
slowStart: cdk.Duration.seconds(0)
)Current Behavior
Slow Start attribute can not be removed from CDK. Not possible to set it to "0".
Reproduction Steps
1 - Create ALB, Listener and Target Group (with
slowStart
property set)2 - Try removing 'slowStart' property and it deploys successfully, but Target Group resource keeps it enabled. Or try to set it to "0" and CDK does not allow it.
Possible Solution
Allow "0" in the range for
cdk.Duration.seconds()
values and implicitly synthesize the Target Group resource with this as default when slowStart attribute is omited (if previously enabled):"TargetGroupAttributes": [ { "Key": "slow_start.duration_seconds", "Value": "0" }
Additional Information/Context
No response
CDK CLI Version
All supported versions, including latest 2.132.0
Framework Version
No response
Node.js Version
16
OS
Mac
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: