stelligent / cfn_nag

Linting tool for CloudFormation templates
MIT License
1.26k stars 212 forks source link

Warning on line -1, how to suppress via MetaData? #524

Closed mongoDynamo closed 3 years ago

mongoDynamo commented 3 years ago
I have the following warnings : WARN W68
Resources: ["ServerlessRestApiDeployment"]
Line Numbers: [-1]
AWS::ApiGateway::Deployment resources should be associated with an AWS::ApiGateway::UsagePlan.

WARN W69
Resources: ["ServerlessRestApiProdStage"]
Line Numbers: [-1]
AWS::ApiGateway::Stage should have the AccessLogSetting property defined.

WARN W64
Resources: ["ServerlessRestApiProdStage"]
Line Numbers: [-1]
AWS::ApiGateway::Stage resources should be associated with an AWS::ApiGateway::UsagePlan.

I['m trying to port an item to a different cloudformation template and noticed this warning for the first time. The intention is to not change the definition for now and I wanted to suppress these warnings. How can this be done with a MetaData tag? I dont want to use a black list profile. Is this possible?

arothian commented 3 years ago

Thanks for the report. Looks like you are getting these from a Serverless transform, which is similar to #522 .

Closing as duplicate.

mongoDynamo commented 3 years ago

Thanks for the report. Looks like you are getting these from a Serverless transform, which is similar to #522 .

Closing as duplicate.

@arothian Just to be clear the above warnings are for items that don't exist in my Cloudformation template. Once the error is resolved in the other ticket will it also resolve my issue? It's essentially warning me about things that aren't in my template.