aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[AWS::ElasticLoadBalancingV2::Listener] - [BUG] - False-positive drift for `ListenerAttributes/tcp.idle_timeout.seconds`

Open
#2,198 1 comment 4 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::ElasticLoadBalancingV2::Listener

### Resource Name

_No response_

### Issue Description

We found a false-positive CloudFormation drift for

```yaml
Listener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
LoadBalancerArn: !GetAtt NLB.LoadBalancerArn
Port: 8080
Protocol: TCP
DefaultActions:
- Type: forward
TargetGroupArn: !GetAtt TargetGroup.TargetGroupArn
ListenerAttributes:
- Key: tcp.idle_timeout.seconds # <-
Value: 6000
```

Property | Change | Expected value | Current value
-- | -- | -- | --
ListenerAttributes | REMOVE | [{"Key":"tcp.idle_timeout.seconds","Value":6000}] | -

### Expected Behavior

CloudFormation Drift Detection is able to find the configuration.

### Observed Behavior

It doesn't work.

### Test Cases

```yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Test

Resources:
NLB:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
IpAddressType: ipv4
Scheme: internal
Type: network
Subnets:
-

Listener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
LoadBalancerArn: !GetAtt NLB.LoadBalancerArn
Port: 8080
Protocol: TCP
DefaultActions:
- Type: forward
TargetGroupArn: !GetAtt TargetGroup.TargetGroupArn
ListenerAttributes:
- Key: tcp.idle_timeout.seconds
Value: 6000

TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
VpcId:
Port: 8080
Protocol: TCP
TargetType: ip
TargetGroupAttributes:
- Key: deregistration_delay.timeout_seconds
Value: 300
- Key: preserve_client_ip.enabled
Value: true
```

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are identified in the issue. Start by reproducing the supplied AWS::ElasticLoadBalancingV2::Listener template and investigate how CloudFormation drift detection handles ListenerAttributes, especially tcp.idle_timeout.seconds. Done means drift detection reports the configured attribute instead of marking ListenerAttributes as removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.