Skip to content

Commit 652dd79

Browse files
eerhardtgithub-actions
authored andcommitted
Use IsAccessKeyAuthenticationDisabled property
1 parent 3a4a49b commit 652dd79

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Aspire.Hosting.Azure.Redis/AzureRedisExtensions.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ public static IResourceBuilder<AzureRedisCacheResource> AddAzureRedis(
129129
{
130130
IsAadEnabled = "true"
131131
};
132-
133-
// TODO: This property should be available from the CDK in the latest version.
134-
var disableAccessKeys = BicepValue<string>.DefineProperty(redis, "DisableAccessKeyAuthentication", ["properties", "disableAccessKeyAuthentication"], isOutput: false, isRequired: false);
135-
disableAccessKeys.Assign("true");
132+
redis.IsAccessKeyAuthenticationDisabled = true;
136133

137134
var principalIdParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalId, typeof(string));
138135
var principalNameParameter = new ProvisioningParameter(AzureBicepResource.KnownParameters.PrincipalName, typeof(string));
@@ -244,10 +241,7 @@ public static IResourceBuilder<AzureRedisCacheResource> WithAccessKeyAuthenticat
244241
infrastructure.Add(keyVault);
245242

246243
redis.RedisConfiguration.Value!.IsAadEnabled.Kind = BicepValueKind.Unset;
247-
248-
// TODO: This property should be available from the CDK in the latest version.
249-
var disableAccessKeys = BicepValue<string>.DefineProperty(redis, "DisableAccessKeyAuthentication", ["properties", "disableAccessKeyAuthentication"], isOutput: false, isRequired: false);
250-
disableAccessKeys.Kind = BicepValueKind.Unset;
244+
redis.IsAccessKeyAuthenticationDisabled.Kind = BicepValueKind.Unset;
251245

252246
var secret = new KeyVaultSecret("connectionString")
253247
{

0 commit comments

Comments
 (0)