Skip to content

Latest commit

 

History

History
48 lines (45 loc) · 4.59 KB

policy-samples.md

File metadata and controls

48 lines (45 loc) · 4.59 KB
title description services documentationcenter author manager editor tags ms.assetid ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author ms.custom
Policy template samples | Microsoft Docs
Azure policy template samples for Virtual Network.
virtual-network
jimdial
jeconnoc
virtual-network
na
sample
05/02/2018
jdial
mvc

Azure policy sample templates for virtual network

The following table includes links to sample Azure Policy templates. The samples are found in the Azure Policy samples repository.

Network
NSG X on every NIC Requires that a specific network security group is used with every virtual network interface. You specify the ID of the network security group to use.
NSG X on every subnet Requires that a specific network security group is used with every virtual subnet. You specify the ID of the network security group to use.
No route table Prohibits virtual networks from being deployed with a route table.
Use approved subnet for VM network interfaces Requires that network interfaces use an approved subnet. You specify the ID of the approved subnet.
Use approved vNet for VM network interfaces Requires that network interfaces use an approved virtual network. You specify the ID of the approved virtual network.
Monitoring
Audit diagnostic setting Audits if diagnostic settings are not enabled for specified resource types. You specify an array of resource types to check whether diagnostic settings are enabled.
Name and text conventions
Allow multiple name patterns Allow one of many name patterns to be used for resources.
Require like pattern Ensure resource names meet the like condition for a pattern.
Require match pattern Ensure resource names match a specified naming pattern.
Require tag match pattern Ensure that a tag value matches a text pattern.
Tags
Billing tags policy initiative Requires specified tag values for cost center and product name. Uses built-in policies to apply and enforce required tags. You specify the required values for the tags.
Enforce tag and its value on resource groups Requires a tag and value on a resource group. You specify the required tag name and value.
Enforce tag and its value Requires a specified tag name and value. You specify the tag name and value to enforce.
Apply tag and its default value Appends a specified tag name and value, if that tag is not provided. You specify the tag name and value to apply.
General
Allowed locations Requires that all resources are deployed to the approved locations. You specify an array of approved locations.
Allowed resource types Ensures only approved resource types are deployed. You specify an array of resource types that are permitted.
Not allowed resource types Prohibits the deployment of specified resource types. You specify an array of the resource types to block.