Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2015 incorrectly raised when type is List<String> and multiple values provided in Default #3465

Closed
verbitan opened this issue Jul 5, 2024 · 0 comments · Fixed by #3466
Closed
Labels
bug Something isn't working

Comments

@verbitan
Copy link

verbitan commented Jul 5, 2024

CloudFormation Lint Version

cfn-lint 1.5.0

What operating system are you using?

RHEL 8.9

Describe the bug

I have a CloudFormation parameter of type List<String> with an AllowedPattern and Default set.

cfn-lint validates a single default value correctly, but incorrectly raises E2015: Default should be allowed by AllowedPattern when a list of default values is provided.

Expected behavior

CloudFormation itself accepts this default, so cfn-lint should also.

Reproduction template

AWSTemplateFormatVersion: "2010-09-09"

Parameters:
  ListOfCIDR:
    Description: List of CIDR.
    Type: List<String>
    Default: 80.0.0.0/0, 81.0.0.0/8, 82.0.0.0/16
    AllowedPattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$
@kddejong kddejong added the bug Something isn't working label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants