Skip to content

fix(elbv2): boolean ALB attributes not reflected in CloudFormation when set to false#37307

Closed
syukawa-gh wants to merge 2 commits intoaws:mainfrom
syukawa-gh:fix/elbv2-boolean-attrs-false-clean
Closed

fix(elbv2): boolean ALB attributes not reflected in CloudFormation when set to false#37307
syukawa-gh wants to merge 2 commits intoaws:mainfrom
syukawa-gh:fix/elbv2-boolean-attrs-false-clean

Conversation

@syukawa-gh
Copy link
Copy Markdown
Contributor

When boolean ALB properties like dropInvalidHeaderFields, preserveHostHeader, xAmznTlsVersionAndCipherSuiteHeaders, preserveXffClientPort, and wafFailOpen were explicitly set to false, they were omitted from the CloudFormation template. This is because the code used truthy checks (if (props.x)) instead of undefined checks (if (props.x !== undefined)), so changing these from true to false would not update the ALB.

All five boolean ALB attributes now use !== undefined checks and emit both true and false values, consistent with how http2Enabled was already handled.

Closes #36409

…en set to false

When boolean ALB properties like dropInvalidHeaderFields,
preserveHostHeader, xAmznTlsVersionAndCipherSuiteHeaders,
preserveXffClientPort, and wafFailOpen were explicitly set to false,
they were omitted from the CloudFormation template because the code
used truthy checks (if (props.x)) instead of undefined checks
(if (props.x !== undefined)). This meant changing these properties
from true to false would not update the ALB configuration.

Now all boolean ALB attributes use !== undefined checks and emit
both 'true' and 'false' values, consistent with how http2Enabled
was already handled.

Closes aws#36409
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Mar 23, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team March 23, 2026 02:54
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@aws-cdk-automation aws-cdk-automation dismissed their stale review March 23, 2026 08:06

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@syukawa-gh
Copy link
Copy Markdown
Contributor Author

Closing in favor of #37485 (same change, updated version)

@syukawa-gh syukawa-gh closed this Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-elasticloadbalancingv2): dropInvalidHeaderFields not reflected in CloudFormation when set from true to false

3 participants