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 -iW causes template metadata to be ignored #3839

Open
ispyinternet opened this issue Nov 22, 2024 · 2 comments
Open

cfn-lint -iW causes template metadata to be ignored #3839

ispyinternet opened this issue Nov 22, 2024 · 2 comments

Comments

@ispyinternet
Copy link

CloudFormation Lint Version

cfn-lint 1.20.0

What operating system are you using?

Amazon Linux 2

Describe the bug

I have the following metadata:

Metadata:
  cfn-lint:
    config:
      ignore_checks:
        - E3006

Expected behavior

if I run cfn-lint template.yaml I only see the warnings
if I run cfn-lint -iW template.yaml I still get the E3006 error

Reproduction template

AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Metadata:
  cfn-lint:
    config:
      ignore_checks:
        - E3006
        
Resources:
  GoogleClientSecret:
    Type: AWS::SSM::Parameter::Value<String>
    Properties:
      Name: "/ClientSecret"
@dishikang123
Copy link

@ispyinternet see #3816. We have the same issue.

@kddejong
Copy link
Contributor

By default the CLI parameters will override any other configuration. So it will ignore Metadata and .cfnlintrc file configurations. There is an option to add --merge-configs to merge lists.

cfn-lint -iW --merge-configs -- local/issue/3839.yaml will return no errors.

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

No branches or pull requests

3 participants