Skip to content

Commit

Permalink
azurerm_redis_cache: Allow AAD auth for all SKUs
Browse files Browse the repository at this point in the history
Fixes #24796
  • Loading branch information
favoretti committed Feb 23, 2024
1 parent 2b6c256 commit f0418f0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions internal/services/redis/redis_cache_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,14 +849,7 @@ func expandRedisConfiguration(d *pluginsdk.ResourceData) (*redis.RedisCommonProp
v, valExists := d.GetOkExists("redis_configuration.0.active_directory_authentication_enabled")
if valExists {
entraEnabled := v.(bool)

// active_directory_authentication_enabled is available when SKU is Premium
if strings.EqualFold(skuName, string(redis.SkuNamePremium)) {

output.AadEnabled = utils.String(strconv.FormatBool(entraEnabled))
} else if entraEnabled && !strings.EqualFold(skuName, string(redis.SkuNamePremium)) {
return nil, fmt.Errorf("The `active_directory_authentication_enabled` property requires a `Premium` sku to be set")
}
output.AadEnabled = utils.String(strconv.FormatBool(entraEnabled))
}

// RDB Backup
Expand Down

0 comments on commit f0418f0

Please sign in to comment.