azure-policy icon indicating copy to clipboard operation
azure-policy copied to clipboard

Microsoft.Web/sites/config/VnetName

Open RichShillingtonMSFT opened this issue 7 years ago • 1 comments

Scenario

I need to create an Azure Policy that audits web sites without associated Virtual Networks. This is to ensure that sites created can be accessed internally only. This needs to be available in Azure Gov as well as Azure Cloud.

Alias

Microsoft.Web/sites/config/VnetName as well as VNet details.

Example policy definition

{ "mode": "all", "policyRule": { "if": { "allOf": [ { "field": "type", "equals": "Microsoft.Web/sites" }, { "anyOf": [ { "field": "Microsoft.Web/sites/config/VnetName", "notlike": "*" } ] } ] }, "then": { "effect": "Audit" } } }

RichShillingtonMSFT avatar Apr 22 '19 14:04 RichShillingtonMSFT

Full set of Microsoft.Web aliases (including this one) has been published to public and government clouds.

mentat9 avatar Apr 23 '19 18:04 mentat9