Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/cache/redis/.bicep/nested_roleAssignments.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var builtInRoleNames = {
'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
}

resource redisCache 'Microsoft.Cache/redis@2021-06-01' existing = {
resource redisCache 'Microsoft.Cache/redis@2022-06-01' existing = {
name: last(split(resourceId, '/'))!
}

Expand Down
2 changes: 1 addition & 1 deletion modules/cache/redis/.test/common/dependencies.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
}

resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: 'privatelink.azuresynapse.net'
name: 'privatelink.redis.cache.windows.net'
location: 'global'

resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
Expand Down
12 changes: 6 additions & 6 deletions modules/cache/redis/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Redis Cache `[Microsoft.Cache/Redis]`
# Redis Cache `[Microsoft.Cache/redis]`

This module deploys a Redis Cache.

Expand All @@ -16,7 +16,7 @@ This module deploys a Redis Cache.
| :-- | :-- |
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.Cache/redis` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2021-06-01/redis) |
| `Microsoft.Cache/redis` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2022-06-01/redis) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
Expand Down Expand Up @@ -337,11 +337,11 @@ privateEndpoints: [
| :-- | :-- | :-- |
| `hostName` | string | Redis hostname. |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The resource name. |
| `resourceGroupName` | string | The name of the resource group the Redis cache was created in. |
| `resourceId` | string | The resource ID. |
| `name` | string | The name of the Redis Cache. |
| `resourceGroupName` | string | The name of the resource group the Redis Cache was created in. |
| `resourceId` | string | The resource ID of the Redis Cache. |
| `sslPort` | int | Redis SSL port. |
| `subnetId` | string | The full resource ID of a subnet in a virtual network where the Redis cache was deployed in. |
| `subnetId` | string | The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in. |

## Cross-referenced modules

Expand Down
10 changes: 5 additions & 5 deletions modules/cache/redis/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource redisCache 'Microsoft.Cache/redis@2021-06-01' = {
resource redisCache 'Microsoft.Cache/redis@2022-06-01' = {
name: name
location: location
tags: tags
Expand Down Expand Up @@ -268,13 +268,13 @@ module redisCache_privateEndpoints '../../network/private-endpoint/main.bicep' =
}
}]

@description('The resource name.')
@description('The name of the Redis Cache.')
output name string = redisCache.name

@description('The resource ID.')
@description('The resource ID of the Redis Cache.')
output resourceId string = redisCache.id

@description('The name of the resource group the Redis cache was created in.')
@description('The name of the resource group the Redis Cache was created in.')
output resourceGroupName string = resourceGroup().name

@description('Redis hostname.')
Expand All @@ -283,7 +283,7 @@ output hostName string = redisCache.properties.hostName
@description('Redis SSL port.')
output sslPort int = redisCache.properties.sslPort

@description('The full resource ID of a subnet in a virtual network where the Redis cache was deployed in.')
@description('The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in.')
output subnetId string = !empty(subnetId) ? redisCache.properties.subnetId : ''

@description('The location the resource was deployed into.')
Expand Down
38 changes: 19 additions & 19 deletions modules/cache/redis/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.20.4.51522",
"templateHash": "17613971923220537390"
"version": "0.21.1.54444",
"templateHash": "12569603126606584530"
},
"name": "Redis Cache",
"description": "This module deploys a Redis Cache.",
Expand Down Expand Up @@ -323,7 +323,7 @@
},
{
"type": "Microsoft.Cache/redis",
"apiVersion": "2021-06-01",
"apiVersion": "2022-06-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
Expand Down Expand Up @@ -414,8 +414,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.20.4.51522",
"templateHash": "11568465556240097908"
"version": "0.21.1.54444",
"templateHash": "7380162094150397462"
}
},
"parameters": {
Expand Down Expand Up @@ -575,8 +575,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.20.4.51522",
"templateHash": "13560297539192628062"
"version": "0.21.1.54444",
"templateHash": "17036874096652764314"
},
"name": "Private Endpoints",
"description": "This module deploys a Private Endpoint.",
Expand Down Expand Up @@ -775,8 +775,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.20.4.51522",
"templateHash": "17831763001460207830"
"version": "0.21.1.54444",
"templateHash": "2469208411936339153"
},
"name": "Private Endpoint Private DNS Zone Groups",
"description": "This module deploys a Private Endpoint Private DNS Zone Group.",
Expand Down Expand Up @@ -913,8 +913,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.20.4.51522",
"templateHash": "11548486149222715894"
"version": "0.21.1.54444",
"templateHash": "13032708393704093995"
}
},
"parameters": {
Expand Down Expand Up @@ -1098,21 +1098,21 @@
"name": {
"type": "string",
"metadata": {
"description": "The resource name."
"description": "The name of the Redis Cache."
},
"value": "[parameters('name')]"
},
"resourceId": {
"type": "string",
"metadata": {
"description": "The resource ID."
"description": "The resource ID of the Redis Cache."
},
"value": "[resourceId('Microsoft.Cache/redis', parameters('name'))]"
},
"resourceGroupName": {
"type": "string",
"metadata": {
"description": "The name of the resource group the Redis cache was created in."
"description": "The name of the resource group the Redis Cache was created in."
},
"value": "[resourceGroup().name]"
},
Expand All @@ -1121,28 +1121,28 @@
"metadata": {
"description": "Redis hostname."
},
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2021-06-01').hostName]"
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2022-06-01').hostName]"
},
"sslPort": {
"type": "int",
"metadata": {
"description": "Redis SSL port."
},
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2021-06-01').sslPort]"
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2022-06-01').sslPort]"
},
"subnetId": {
"type": "string",
"metadata": {
"description": "The full resource ID of a subnet in a virtual network where the Redis cache was deployed in."
"description": "The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in."
},
"value": "[if(not(empty(parameters('subnetId'))), reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2021-06-01').subnetId, '')]"
"value": "[if(not(empty(parameters('subnetId'))), reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2022-06-01').subnetId, '')]"
},
"location": {
"type": "string",
"metadata": {
"description": "The location the resource was deployed into."
},
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2021-06-01', 'full').location]"
"value": "[reference(resourceId('Microsoft.Cache/redis', parameters('name')), '2022-06-01', 'full').location]"
}
}
}