Skip to content

Commit

Permalink
azurerm_redis_cache: Allow AAD auth for all SKUs (hashicorp#25006)
Browse files Browse the repository at this point in the history
  • Loading branch information
favoretti authored and rizkybiz committed Feb 29, 2024
1 parent 5333329 commit 62309d4
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 62309d4

Please sign in to comment.