Skip to content

fix(elbv2): clarify imported target group listener warning - #39334

Open
caglarkc wants to merge 2 commits into
aws:mainfrom
caglarkc:fix/elbv2-imported-target-group-warning-31103
Open

caglarkc wants to merge 2 commits into
aws:mainfrom
caglarkc:fix/elbv2-imported-target-group-warning-31103

Conversation

@caglarkc

@caglarkc caglarkc commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Issue # (if applicable)

Closes #31103.

Description

Attaching a listener to an imported application target group works, but the warning incorrectly says the listener cannot be registered. Explain the actual limitation: CDK cannot automatically update the targets' security groups. Keep the existing warning identifier so acknowledgements continue to work.

Validation

  • Application target group unit tests: 81 passed, including the regression that asserts both the listener forward action and the security-group warning.
  • ESLint passed for both changed TypeScript files.

Integration-test exemption requested: this changes only diagnostic wording, without changing deployment templates or runtime behavior.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@caglarkc
caglarkc deployed to automation October 16, 2026 13:37 — with GitHub Actions Active
@caglarkc
caglarkc deployed to automation October 16, 2026 13:37 — with GitHub Actions Active
@github-actions github-actions Bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Oct 16, 2026
@caglarkc
caglarkc deployed to automation October 16, 2026 13:37 — with GitHub Actions Active
@aws-cdk-automation
aws-cdk-automation requested a review from a team October 16, 2026 13:37
@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 Oct 16, 2026

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

@maintainer-for-aws

Copy link
Copy Markdown

Automated review

A maintainer will still review this — treat the notes below as a starting point.

📌 Commit f13f981

This PR clarifies a misleading synthesis-time warning on ImportedApplicationTargetGroup.registerListener in the elbv2 package. It rewords a single Annotations.of(this).addWarningV2(...) message so it accurately describes the real limitation (CDK cannot auto-manage target security groups for an imported target group) instead of the inaccurate "cannot register listener," and adds a regression test. The stable acknowledgement id (@aws-cdk/aws-elbv2:albTargetGroupCannotRegisterListener) is preserved, so users who already suppressed this warning keep it suppressed, and no CloudFormation output or runtime behavior changes. The new test locks in both the positive listener forward-action synthesis and the exact warning text with the preserved ack id, guarding against a future accidental removal. No issues found on this change.

🔴 0 blocking · 🟡 0 recommended · ⚪ 0 optional


Generated automatically. React 👍 or 👎 to tell us whether this review helped, so we can improve these reviews.

@caglarkc
caglarkc deployed to automation October 16, 2026 14:20 — with GitHub Actions Active
@caglarkc

Copy link
Copy Markdown
Contributor Author

Could a maintainer consider pr-linter/exempt-integ-test for this warning-text correction? It preserves the warning ID and deployment template. The 81 target-group tests pass, including the regression that verifies listener forwarding still works and the warning accurately describes manual security-group updates.

This branch was successfully deployed

1 active deployment
automation — f13f9813 Deployed Oct 16, 2026 by caglarkc via validate-pr #372923
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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: false warning about not being able to register listener on imported target group

2 participants