-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(ELB): Unable to disable cookie stickiness by removing enableCookieStickiness #16620
Copy link
Copy link
Closed
Closed
Copy link
Labels
@aws-cdk/aws-elasticloadbalancingRelated to Amazon Elastic Load BalancingRelated to Amazon Elastic Load BalancingbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1
Description
Targetgroup does not get updated after removing cookiestickiness
Reproduction Steps
We enabled CookieStickiness for our targetgroup. This worked fine.
fargateService.targetGroup.enableCookieStickiness(cdk.Duration.days(1))
When we tried to disable by removing above line in CDK the changes did not get applied in our targetgroup. As seen below:

This is the applied cloudformation changeset after deploying the code without the line : fargateService.targetGroup.enableCookieStickiness(cdk.Duration.days(1))
[
{
"resourceChange": {
"logicalResourceId": "LoadBalancerPublicListenerECSGroup253F49BD",
"action": "Modify",
"physicalResourceId": "arn:aws:elasticloadbalancing:xxxxxxx:xxxxxx:targetgroup/serve-LoadB-146FJVGD6WPDF/04904465ae97ccf4",
"resourceType": "AWS::ElasticLoadBalancingV2::TargetGroup",
"replacement": "False",
"moduleInfo": null,
"details": [
{
"target": {
"name": "TargetGroupAttributes",
"requiresRecreation": "Never",
"attribute": "Properties"
},
"causingEntity": null,
"evaluation": "Static",
"changeSource": "DirectModification"
}
],
"changeSetId": null,
"scope": [
"Properties"
]
},
"hookInvocationCount": null,
"type": "Resource"
}
]
What did you expect to happen?
I expected after removing enableCookieStickiness stickiness would have been disabled
Environment
- **CDK CLI Version :**1.124.0
- **Framework Version:**1.124.0
- Node.js Version: v14.16.0
- **OS :**Mac
- Language (Version): TypeScript (3.8.3)
Other
It might make sense when no cookieStickiness attributes are set to disable it by default.
"TargetGroupAttributes": Array [
Object {
"Key": "stickiness.enabled",
"Value": "false",
},
],
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-elasticloadbalancingRelated to Amazon Elastic Load BalancingRelated to Amazon Elastic Load BalancingbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1