diff --git a/src/Aspire.Hosting.Azure.Redis/AzureRedisExtensions.cs b/src/Aspire.Hosting.Azure.Redis/AzureRedisExtensions.cs index d1c5cb0de9e..abbb50fe5cb 100644 --- a/src/Aspire.Hosting.Azure.Redis/AzureRedisExtensions.cs +++ b/src/Aspire.Hosting.Azure.Redis/AzureRedisExtensions.cs @@ -129,10 +129,7 @@ public static IResourceBuilder AddAzureRedis( { IsAadEnabled = "true" }; - - // TODO: This property should be available from the CDK in the latest version. - var disableAccessKeys = BicepValue.DefineProperty(redis, "DisableAccessKeyAuthentication", ["properties", "disableAccessKeyAuthentication"], isOutput: false, isRequired: false); - disableAccessKeys.Assign("true"); + redis.IsAccessKeyAuthenticationDisabled = true; var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string)); var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string)); @@ -244,10 +241,7 @@ public static IResourceBuilder WithAccessKeyAuthenticat infrastructure.Add(keyVault); redis.RedisConfiguration.Value!.IsAadEnabled.Kind = BicepValueKind.Unset; - - // TODO: This property should be available from the CDK in the latest version. - var disableAccessKeys = BicepValue.DefineProperty(redis, "DisableAccessKeyAuthentication", ["properties", "disableAccessKeyAuthentication"], isOutput: false, isRequired: false); - disableAccessKeys.Kind = BicepValueKind.Unset; + redis.IsAccessKeyAuthenticationDisabled.Kind = BicepValueKind.Unset; var secret = new KeyVaultSecret("connectionString") {