Skip to content

How do I suppress a rule for all ARM templates? #1999

Answered by BernieWhite
mikejwhat asked this question in Q&A
Discussion options

You must be logged in to vote

@mikejwhat The specific rule should be flagging against the files early in the process, before the resources are expanded. To suppress this rule you wouldn't be able to use the field: resources option, at least currently.

However you can:

1. Ignore/ exclude the rule

Since you don't want to run the rule for any template this is the simplest methods. Just set Rule.Exclude option.

For example in ps-rule.yaml:

rule:
  exclude:
  - Azure.Template.UseComments

2. Use a suppression group

For you use case this is unnecessary in because it is a little more complex. However does provide one benefit/ disadvantage depending on your perspective. It will generate a warning by default for each file that …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BernieWhite
Comment options

@mikejwhat
Comment options

Answer selected by BernieWhite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants