cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

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

Open r-heimann opened this issue 11 months ago • 1 comments

Name of the resource

AWS::ElasticLoadBalancingV2::Listener

Resource Name

No response

Issue Description

We found a false-positive CloudFormation drift for

  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

AWSTemplateFormatVersion: 2010-09-09
Description: Test

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

  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: <vpc-id>
      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

r-heimann avatar Nov 25 '24 08:11 r-heimann