Skip to content


Learn by example#

PSRule for Azure helps you quickly identify and fix issues to improve the quality of solutions deployed on Azure. Tests include documentation with official documentation references and examples. Use the Azure Bicep or template examples to adapt your solution to recommendations.


Start exploring the list of rules included with PSRule for Azure.

Framework aligned#

PSRule for Azure is aligned to the Azure Well-Architected Framework (WAF). Tests called rules check the configuration of Azure resources against WAF principles. Rules exist across five (5) WAF pillars:

To help you align your Infrastructure as Code (IaC) to WAF principles, PSRule for Azure includes documentation. Included are examples, references to WAF and product documentation. This allows you to explore and learn the context of each WAF principle.

Start day one#

PSRule for Azure includes over 400 rules for validating resources against configuration recommendations. Rules automatically detect and analyze resources from Azure IaC artifacts. This allows you to quickly light up unit testing of Azure resources from templates and Bicep deployments.

Use the built-in rules to start enforcing testing quickly. Then layer on your own rules as your organization's requirements mature. Custom rules can be implemented quickly and work side-by-side with built-in rules.

As new built-in rules are added and improved, download the latest version to start using them.


For detailed information on building custom rules see:

DevOps integrated#

Azure resources can be validated throughout their lifecycle to support a DevOps culture. Start testing your Bicep and ARM templates from code by validating them offline before deployment.

Pre-flight validation can be integrated into a continuous integration (CI) pipeline as unit tests to:

  • Shift-left — Identify configuration issues and provide fast feedback in PRs.
  • Quality gates — Implement quality gates between environments such as dev, test, and production.
  • Monitor continuously — Perform ongoing checks for configuration optimization opportunities.


You can learn more about Azure Bicep with the following links:


PSRule for Azure uses modern PowerShell libraries at its core, allowing it to go anywhere PowerShell can go. PSRule for Azure runs on MacOS, Linux, and Windows.

PowerShell makes it easy to integrate PSRule into popular CI systems. Run natively or in a container depending on your platform. PSRule has native extensions for:

Additionally, PSRule for Azure can be installed locally or within Azure Cloud Shell. For installation options see installation.