Skip to content

Using Azure.xx Baseline line in Assert-PSrule #1541

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

You must be logged in to vote

@JonasCordsen Thanks for the question. My understanding of your questions is that:

  • You would like to run PSRule for Azure locally with the Azure.GA_2022_06 baseline.

Is this correct?


To do this, you need to specify the -Module you want to use by default. For example:

Assert-PSRule -Format File -InputPath . -Baseline 'Azure.GA_2022_06' -Path '.ps-rule/' -Module 'PSRule.Rules.Azure'

Alternatively you can configure ps-rule.yaml in the working directory, which is generally desired when you are working with Infrastructure as Code, but may not be applicable in your use case.

If you use ps-rule.yaml you can set the Include.Module option.


If you have custom rules, then that you want to run as…

Replies: 1 comment 2 replies

Comment options

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

@BernieWhite
Comment options

Answer selected by JonasCordsen
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