aws_elasticloadbalancingv2: Tagging an ALB listener rule not working
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
Tagging an ALB listener rule not working as expected. I am not getting any error. It is not creating the Tags.
I have this ALB listener rule:
```typescript
const applicationListenerRule = new alb.ApplicationListenerRule(
this,
`ListenerRule${server.node.id}`,
{
listener: listener,
priority: priority,
conditions: [
alb.ListenerCondition.hostHeaders([recordSet.domainName]),
],
action: alb.ListenerAction.authenticateOidc({
authorizationEndpoint: oktaJson.authorizationEndpoint || '',
issuer: oktaJson.issuer || '',
tokenEndpoint: oktaJson.tokenEndpoint || '',
userInfoEndpoint: oktaJson.userInfoEndpoint || '',
next:
alb.ListenerAction.forward([instanceTargetGroup]) || '',
clientId: oktaJson.clientId || '',
clientSecret: SecretValue.secretsManager(
oktaJson.clientSecret || ''
),
}),
}
);
Tags.of(applicationListenerRule).add(
'Name',
'my-name'
);
```
The last part of the code is not creating the tag `Name`.
### Expected Behavior
I am expecting the Tag to be created for the ALB listener rule.
### Current Behavior
CDK deployment ran correctly but after inspecting the Cloud Formation I don't see the Tag section for the ALB listener rule
### Reproduction Steps
1. Create an ALB
2. Create an ALB Listener rule
3. Tag the ALB Listener rule
4. Do a CDK Synth
5. Check the CF. The Tag will not be created
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.102.0
### Framework Version
_No response_
### Node.js Version
v18.18.2
### OS
Mac OS
### Language
TypeScript
### Language Version
Version 5.2.2
### Other information
_No response_
Contributor guide
Research direction
Start by reproducing the issue with the TypeScript example and the listed CDK synth steps, then inspect the synthesized CloudFormation for the ALB listener rule. Trace the ApplicationListenerRule tagging path and verify that the completed change emits a Name tag for the rule and preserves successful deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100