aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.46k stars 596 forks source link

Feature Request: `AWS::ElasticLoadBalancingV2::ListenerRule` - PathPatternConfig/Values cannot have more than 5 #3833

Open r-heimann opened 3 days ago

r-heimann commented 3 days ago

Is this feature request related to a new rule or cfn-lint capabilities?

No response

Describe the feature you'd like to request

It would be great if cfn-lint can warn about PathPatternConfig/Values which are >5. This will result in the error message

Resource handler returned message: "A rule can only have '5' condition values
(Service: ElasticLoadBalancingV2, Status Code: 400, Request ID: a5...)"
(RequestToken: 358..., HandlerErrorCode: InvalidRequest)

Example:

  ListenerRule:
    Type: AWS::ElasticLoadBalancingV2::ListenerRule
    Properties:
      ListenerArn: !GetAtt ALBListener.ListenerArn
      Priority: 1
      Conditions:
        - Field: path-pattern
          PathPatternConfig:
            Values:
              - /a
              - /b
              - /c
              - /d
              - /e
              - /f
      Actions:
        - Order: 1
          TargetGroupArn: !GetAtt TargetGroup.TargetGroupArn
          Type: forward

Describe the solution you'd like

See above

Additional context

No response

Is this something that you'd be interested in working on?

Would this feature include a breaking change?

r-heimann commented 1 day ago

Just wanted to note that the official documentation doesn't specify the max items: AWS::ElasticLoadBalancingV2::ListenerRule PathPatternConfig

I opened a AWS Documentation Feedback to let them know that this is missing.