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

cfn-lint v1 does not warn about missing mapping keys #3385

Closed
nosnilmot opened this issue Jun 24, 2024 · 2 comments · Fixed by #3402
Closed

cfn-lint v1 does not warn about missing mapping keys #3385

nosnilmot opened this issue Jun 24, 2024 · 2 comments · Fixed by #3402

Comments

@nosnilmot
Copy link

CloudFormation Lint Version

1.3.3 & git (b0782f8)

What operating system are you using?

Mac

Describe the bug

cfn-lint v1 (1.3.3) does not warn about missing mapping keys.

This was first noticed with missing second level key, but it applies to both first and second level.

Expected behavior

cfn-lint 0.87.7 would warn:

W1011 FindInMap second key "MissingName" doesn't exist in map "Map" under "Key" at Resources/Bucket/Properties/BucketName/Fn::FindInMap
map.yaml:14:11

I would actually expect this to be W7xxx or even E7xxx, but I'll be happy with anything other than silence 😄

Reproduction template

AWSTemplateFormatVersion: '2010-09-09'
Mappings:
  Map:
    Key:
      Name: "unused"
Resources:
  Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName:
        Fn::FindInMap:
        - "Map"
        - "Key"
        - "MissingName"
@nosnilmot
Copy link
Author

Rule W1011 was removed in c7d01e9 (#3055) and is now used for a completely different warning (Use dynamic references over parameters for secrets)

@kddejong
Copy link
Contributor

Looking into it. We should have still caught this but the rule would have changed so I have to see what I'm missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants