Skip to content

W2001: Parameter <name> not used inaccurate when used in Metadata #3872

Open
@gbudge

Description

@gbudge

CloudFormation Lint Version

cfn-lint 1.22.0

What operating system are you using?

Windows 10

Describe the bug

When using a template parameter in Metadata, cfn-lint incorrectly raises W2001 that the parameter is not used.

Expected behavior

cfn-lint should not raise W2001 when a parameter is used in Metadata.

Reproduction template

Description: CloudFormation template

Metadata:
  ExampleMetadata: !Sub BucketPurpose

Parameters:
  BucketName:
    Type: String
    Description: Example parameter
  BucketPurpose:
    Type: String
    Description: Example parameter

Resources:
  ExampleResource:
    Type: 'AWS::S3::Bucket'
    Properties:
      BucketName: !Ref BucketName

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions