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
Targetgroup does not get updated after removing cookiestickiness
Reproduction Steps
We enabled CookieStickiness for our targetgroup. This worked fine.
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))What did you expect to happen?
I expected after removing
enableCookieStickinessstickiness would have been disabledEnvironment
Other
It might make sense when no cookieStickiness attributes are set to disable it by default.
This is 🐛 Bug Report