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

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

Open
gbudge opened this issue Dec 12, 2024 · 1 comment
Open

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

gbudge opened this issue Dec 12, 2024 · 1 comment

Comments

@gbudge
Copy link

gbudge commented Dec 12, 2024

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
@kddejong
Copy link
Contributor

I'm trying to find a way to validate this but template metadata section goes unresolved. How are you validating this Sub/Ref function actually does what you want?

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

No branches or pull requests

2 participants