-
Notifications
You must be signed in to change notification settings - Fork 598
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
Comments
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? |
Hi, Apologies for the delayed response. The metadata as I understand it can be used by other tooling for more or less any arbitrary reason & it would be up to that tool to resolve the !Ref. For example, I could create a simple html5 SPA to create a diagram and use the metadata to add for example the version of the template to be used when visualising. However, I did find this example that uses metadata for the interface, which I will admit I haven't tested:
Hope this helps. |
The template you provided here will result in the javascript on the web browser to fail. Because Its possible you are running this through another solution that will modify the template. You can always configure cfn-lint to ignore this error as a result. The core engine of CloudFormation will not translate the values in the template Metadata section. |
None the less though, it shouldn't fail when the Ref exists. |
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
The text was updated successfully, but these errors were encountered: