diff --git a/src/frontend/src/content/docs/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host.mdx b/src/frontend/src/content/docs/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host.mdx index d69a619e3..46a9d8c39 100644 --- a/src/frontend/src/content/docs/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host.mdx +++ b/src/frontend/src/content/docs/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host.mdx @@ -260,30 +260,34 @@ If you're new to [Bicep](https://learn.microsoft.com/azure/azure-resource-manage @description('The location for the resource(s) to be deployed.') param location string = resourceGroup().location -resource cache 'Microsoft.Cache/redis@2024-11-01' = { +resource cache 'Microsoft.Cache/redisEnterprise@2025-07-01' = { name: take('cache-${uniqueString(resourceGroup().id)}', 63) location: location + sku: { + name: 'Balanced_B0' + } properties: { - sku: { - name: 'Basic' - family: 'C' - capacity: 1 - } - enableNonSslPort: false - disableAccessKeyAuthentication: true minimumTlsVersion: '1.2' - redisConfiguration: { - 'aad-enabled': 'true' - } + publicNetworkAccess: 'Enabled' } - tags: { - 'aspire-resource-name': 'cache' +} + +resource cache_default 'Microsoft.Cache/redisEnterprise/databases@2025-07-01' = { + name: 'default' + properties: { + accessKeysAuthentication: 'Disabled' + port: 10000 } + parent: cache } -output connectionString string = '${cache.properties.hostName},ssl=true' +output connectionString string = '${cache.properties.hostName}:10000,ssl=true' output name string = cache.name + +output id string = cache.id + +output hostName string = cache.properties.hostName ``` In addition, role assignments are created for the Azure resource in a separate module: @@ -296,20 +300,24 @@ param cache_outputs_name string param principalId string -param principalName string - -resource cache 'Microsoft.Cache/redis@2024-11-01' existing = { +resource cache 'Microsoft.Cache/redisEnterprise@2025-07-01' existing = { name: cache_outputs_name } -resource cache_contributor 'Microsoft.Cache/redis/accessPolicyAssignments@2024-11-01' = { - name: guid(cache.id, principalId, 'Data Contributor') +resource cache_default 'Microsoft.Cache/redisEnterprise/databases@2025-07-01' existing = { + name: 'default' + parent: cache +} + +resource cache_default_contributor 'Microsoft.Cache/redisEnterprise/databases/accessPolicyAssignments@2025-07-01' = { + name: guid(cache_default.id, principalId, 'default') properties: { - accessPolicyName: 'Data Contributor' - objectId: principalId - objectIdAlias: principalName + accessPolicyName: 'default' + user: { + objectId: principalId + } } - parent: cache + parent: cache_default } ``` @@ -328,13 +336,12 @@ builder.AddAzureManagedRedis("cache") .ConfigureInfrastructure(infra => { var redisCache = infra.GetProvisionableResources() - .OfType() + .OfType() .Single(); - redisCache.Sku = new RedisSku + redisCache.Sku = new RedisEnterpriseSku { - Name = RedisSkuName.Standard, - Family = RedisSkuFamily.C, + Name = RedisEnterpriseSkuName.BalancedB1, Capacity = 1, }; redisCache.Tags.Add("ExampleKey", "Example value"); @@ -354,7 +361,7 @@ await builder.addAzureManagedRedis("cache") .configureInfrastructure(async (infra) => { // Use the AzureResourceInfrastructure API to customize Bicep // parameters or resources directly. - await infra.addParameter("skuName", "Standard"); + await infra.addParameter("skuName", "BalancedB1"); }); // After adding all resources, run the app... @@ -363,7 +370,7 @@ await builder.build().run(); -The preceding C# code retrieves the `RedisCache` resource from the infrastructure and updates the SKU to `Standard` tier with capacity 1, then adds a tag. The TypeScript AppHost exposes the same `configureInfrastructure` API for adding Bicep parameters and customizing resource configuration. +The preceding C# code retrieves the `RedisEnterpriseCluster` resource from the infrastructure and updates the SKU to `BalancedB1` tier with capacity 1, then adds a tag. The TypeScript AppHost exposes the same `configureInfrastructure` API for adding Bicep parameters and customizing resource configuration. For more configuration options, see [Azure.Provisioning customization](/integrations/cloud/azure/customize-resources/#azureprovisioning-customization).