From 9153f1346bc6a1e601ecea1eb3be2bafd8f134c6 Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:26:13 +1200 Subject: [PATCH 1/2] Updated Redis Cache --- .../redis/.test/common/dependencies.bicep | 2 +- modules/cache/redis/README.md | 10 +++---- modules/cache/redis/main.bicep | 8 +++--- modules/cache/redis/main.json | 28 +++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/cache/redis/.test/common/dependencies.bicep b/modules/cache/redis/.test/common/dependencies.bicep index 6e785bcc07..5bb5dc56bd 100644 --- a/modules/cache/redis/.test/common/dependencies.bicep +++ b/modules/cache/redis/.test/common/dependencies.bicep @@ -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' = { diff --git a/modules/cache/redis/README.md b/modules/cache/redis/README.md index 713fbd99f7..edfba999fe 100644 --- a/modules/cache/redis/README.md +++ b/modules/cache/redis/README.md @@ -1,4 +1,4 @@ -# Redis Cache `[Microsoft.Cache/Redis]` +# Redis Cache `[Microsoft.Cache/redis]` This module deploys a Redis Cache. @@ -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 diff --git a/modules/cache/redis/main.bicep b/modules/cache/redis/main.bicep index a71458b713..0f12960274 100644 --- a/modules/cache/redis/main.bicep +++ b/modules/cache/redis/main.bicep @@ -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.') @@ -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.') diff --git a/modules/cache/redis/main.json b/modules/cache/redis/main.json index 81404c7da3..df07affdc0 100644 --- a/modules/cache/redis/main.json +++ b/modules/cache/redis/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.20.4.51522", - "templateHash": "17613971923220537390" + "version": "0.21.1.54444", + "templateHash": "6685144849617645027" }, "name": "Redis Cache", "description": "This module deploys a Redis Cache.", @@ -414,8 +414,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.20.4.51522", - "templateHash": "11568465556240097908" + "version": "0.21.1.54444", + "templateHash": "7380162094150397462" } }, "parameters": { @@ -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.", @@ -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.", @@ -913,8 +913,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.20.4.51522", - "templateHash": "11548486149222715894" + "version": "0.21.1.54444", + "templateHash": "13032708393704093995" } }, "parameters": { @@ -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]" }, @@ -1133,7 +1133,7 @@ "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, '')]" }, From 17c524f345b5114ce6d09299c6ed95a8d9e425ce Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:29:01 +1200 Subject: [PATCH 2/2] Updated API version --- .../cache/redis/.bicep/nested_roleAssignments.bicep | 2 +- modules/cache/redis/README.md | 2 +- modules/cache/redis/main.bicep | 2 +- modules/cache/redis/main.json | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/cache/redis/.bicep/nested_roleAssignments.bicep b/modules/cache/redis/.bicep/nested_roleAssignments.bicep index 144412b6a5..636cba1395 100644 --- a/modules/cache/redis/.bicep/nested_roleAssignments.bicep +++ b/modules/cache/redis/.bicep/nested_roleAssignments.bicep @@ -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, '/'))! } diff --git a/modules/cache/redis/README.md b/modules/cache/redis/README.md index edfba999fe..a9732cb76c 100644 --- a/modules/cache/redis/README.md +++ b/modules/cache/redis/README.md @@ -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) | diff --git a/modules/cache/redis/main.bicep b/modules/cache/redis/main.bicep index 0f12960274..84350bf9bc 100644 --- a/modules/cache/redis/main.bicep +++ b/modules/cache/redis/main.bicep @@ -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 diff --git a/modules/cache/redis/main.json b/modules/cache/redis/main.json index df07affdc0..f3994029eb 100644 --- a/modules/cache/redis/main.json +++ b/modules/cache/redis/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.21.1.54444", - "templateHash": "6685144849617645027" + "templateHash": "12569603126606584530" }, "name": "Redis Cache", "description": "This module deploys a Redis Cache.", @@ -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')]", @@ -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." }, - "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]" } } } \ No newline at end of file