During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in
Policy & Compliance
Heads up
Locally's built-in support for Policy and Compliance means you can build and deploy your applications, and then find out whether you're compliant with all of the policies you need to be - be those the built-in Azure Policy definitions, or custom Azure Policies that your team uses.
Compliance
Locally checks the resources that you've deployed into your Subscription against each Initiative (like CIS Azure Foundations or PCI-DSS), which you can find in the Locally Dashboard, under Governance → Compliance:
Your compliance is re-evaluated each time you open this page - so you can deploy your resources, and then confirm you're compliant with the policies you expect. Where you aren't, you can drill into the Initiative to see exactly which resources aren't compliant, and how to fix them:
From there you can fix them yourself, redeploy and check again - or have your AI agent pick this up using the MCP Server, and make the fixes for you.
Initiatives don't need to be assigned to a Subscription to show up here - we show your compliance with all of the built-in Azure Policies. Each policy is checked using its default parameters, and is either:
- Compliant - none of your resources break it.
- Non-Compliant - at least one of your resources does.
- Not Evaluated - Locally can't check the policy's rule yet (see the Notes below). Far fewer policies end up here now that Locally supports
count,[*]aliases and template functions. - Manual - someone needs to confirm it's met, so it can't be checked automatically.
Not Evaluated and Manual policies aren't counted towards the compliance percentage.
Assigning policies
Policies can be assigned at the Management Group, Subscription or Resource Group scope using the Azure CLI, Terraform or an ARM Template - or to the current Subscription from the Policies tab within the Locally Dashboard:
Locally ships with the full set of built-in Azure Policy definitions, so any of them can be assigned to your Subscription or Resource Group - alongside your own custom policies.
What happens when you deploy depends on the policy's effect:
- Deny and DenyAction policies block the request, with a
RequestDisallowedByPolicyerror. If you'd rather see the violation than be blocked by it, turn on the Allow Provisioning Regardless of Policy? feature flag for the Subscription (in Settings → Feature Flags) - the resource is provisioned and the violation is recorded on the Governance page instead. - Append and Modify policies change the request before it's applied.
- DeployIfNotExists policies deploy the missing resources afterwards. The remediation sees the full resource that triggered it, so conditions and deployment parameters that read its properties work.
- Audit and AuditIfNotExists policies record the result, without blocking anything.
Exclusions and an Enforcement Mode of DoNotEnforce are honoured too - and you can see what happened on the Policy Evaluation Results tab.
Notes
Locally evaluates your compliance with these policies on a best-effort basis, and is designed to be used alongside Azure Policy and Microsoft Defender for Cloud (which gives you extra functionality, such as your Secure Score) - rather than to replace them.
By checking your compliance within Locally, you shift compliance left - allowing developers and their AI agents to fix issues before deploying for real, which reduces the time spent on compliance.
Locally evaluates nearly all policy rules, including count expressions, aliases using [*], template functions like [parameters()] and [field()], and every condition operator. Assigning an Initiative enforces each of its policies when you deploy, using the Initiative's parameters.
A policy still shows as Not Evaluated when Locally can't work out its rule - for example when a field uses an index like [0] rather than [*], an expression uses a function Locally doesn't support, a parameter has no default value for the Compliance page to use, or a condition compares values of the wrong type.
Should you encounter any issues, please take a look at the troubleshooting section, reach out in our Discord or open an issue and we'll take a look.
During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in