Gallery › Cache › Azure built-in policies
[Deprecated]: Azure Cache for Redis should reside within a virtual network
Converted Policy Audit Deny Disabled Mode Indexed Version 1.0.3-deprecated Deprecated
Azure Virtual Network deployment provides enhanced security and isolation for your Azure Cache for Redis, as well as subnets, access control policies, and other features to further restrict access.When an Azure Cache for Redis instance is configured with a virtual network, it is not publicly addressable and can only be accessed from virtual machines and applications within the virtual network.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
{
"properties": {
"displayName": "[Deprecated]: Azure Cache for Redis should reside within a virtual network",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Azure Virtual Network deployment provides enhanced security and isolation for your Azure Cache for Redis, as well as subnets, access control policies, and other features to further restrict access.When an Azure Cache for Redis instance is configured with a virtual network, it is not publicly addressable and can only be accessed from virtual machines and applications within the virtual network.",
"metadata": {
"version": "1.0.3-deprecated",
"deprecated": true,
"category": "Cache"
},
"version": "1.0.3",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Audit",
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "The effect determines what happens when the policy rule is evaluated to match."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Cache/redis"
},
{
"field": "Microsoft.Cache/Redis/subnetId",
"exists": "false"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.3"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/7d092e0a-7acd-40d2-a975-dca21cae48c4",
"name": "7d092e0a-7acd-40d2-a975-dca21cae48c4"
}# Converted from RedisCache_CacheInVnet_Audit.json by ConvertTo-Bylaw.
Policy '7d092e0a-7acd-40d2-a975-dca21cae48c4' {
Properties @{
DisplayName = '[Deprecated]: Azure Cache for Redis should reside within a virtual network'
Description = 'Azure Virtual Network deployment provides enhanced security and isolation for your Azure Cache for Redis, as well as subnets, access control policies, and other features to further restrict access.When an Azure Cache for Redis instance is configured with a virtual network, it is not publicly addressable and can only be accessed from virtual machines and applications within the virtual network.'
Version = '1.0.3-deprecated'
Deprecated = $true
Category = 'Cache'
PolicyVersion = '1.0.3'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'The effect determines what happens when the policy rule is evaluated to match.'
}
Resource 'Microsoft.Cache/redis' {
Require 'subnetId exists' {
Field subnetId | Must -Exist
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Cache/RedisCache_CacheInVnet_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw