Using Azure.xx Baseline line in Assert-PSrule #1541
-
I would like to be able to use the public shared Baseline in local testing via Powershell When I do local rule testing via the powershell module with the following command: It seems like it is only processing the local rules I have created. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@JonasCordsen Thanks for the question. My understanding of your questions is that:
Is this correct? To do this, you need to specify the Assert-PSRule -Format File -InputPath . -Baseline 'Azure.GA_2022_06' -Path '.ps-rule/' -Module 'PSRule.Rules.Azure' Alternatively you can configure If you use If you have custom rules, then that you want to run as the same time as PSRule for Azure rules, then you should also set the Rule.IncludeLocal option. This is because by default the baseline will exclude rules not included in PSRule for Azure. I hope that helps. |
Beta Was this translation helpful? Give feedback.
@JonasCordsen Thanks for the question. My understanding of your questions is that:
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: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…