Skip to content
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

feat(elbv2) expose connection_termination attribute on network target group #20821

Merged
merged 8 commits into from
Jul 6, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ export interface NetworkTargetGroupProps extends BaseTargetGroupProps {
* @default - No targets.
*/
readonly targets?: INetworkLoadBalancerTarget[];

/**
corymhall marked this conversation as resolved.
Show resolved Hide resolved
*
* Indicates whether the load balancer terminates connections at
* the end of the deregistration timeout.
*
* @default false
*/
readonly connectionTermination?: boolean;
}

/**
Expand Down Expand Up @@ -93,7 +102,9 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge
if (props.preserveClientIp !== undefined) {
this.setAttribute('preserve_client_ip.enabled', props.preserveClientIp ? 'true' : 'false');
}

if (props.connectionTermination !== undefined) {
this.setAttribute('deregistration_delay.connection_termination.enabled', props.connectionTermination ? 'true' : 'false');
}
this.addTarget(...(props.targets || []));
}

Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-elasticloadbalancingv2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"devDependencies": {
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
Expand Down
Loading