Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Updated from upstream (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: System <noreply@azure.com>
  • Loading branch information
matt-FFFFFF and System authored Jul 5, 2021
1 parent 322ad79 commit 4f6a8f5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions policydefinition-deny_subnet_without_udr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ resource "azurerm_policy_definition" "deny_subnet_without_udr" {
policy_type = "Custom"
mode = "All"
display_name = "Subnets should have a User Defined Route"
description = "This policy denies the creation of a subsnet with out a User Defined Route."
description = "This policy denies the creation of a subnet with out a User Defined Route."
metadata = <<METADATA
{
"version": "1.0.0",
"version": "1.1.0",
"category": "Network"
}
METADATA
Expand All @@ -21,6 +21,10 @@ METADATA
"field": "type",
"equals": "Microsoft.Network/virtualNetworks/subnets"
},
{
"field": "name",
"notIn": "[parameters('excludedSubnets')]"
},
{
"field": "Microsoft.Network/virtualNetworks/subnets/routeTable.id",
"exists": "false"
Expand All @@ -47,6 +51,16 @@ POLICYRULE
"Disabled"
],
"defaultValue": "Deny"
},
"excludedSubnets": {
"type": "Array",
"metadata": {
"displayName": "Excluded Subnets",
"description": "Array of subnet names that are excluded from this policy"
},
"defaultValue": [
"AzureBastionSubnet"
]
}
}
PARAMETERS
Expand Down

0 comments on commit 4f6a8f5

Please sign in to comment.