diff --git a/internal/services/redis/redis_cache_resource.go b/internal/services/redis/redis_cache_resource.go index e96bfc51c939..fca201b77852 100644 --- a/internal/services/redis/redis_cache_resource.go +++ b/internal/services/redis/redis_cache_resource.go @@ -179,7 +179,7 @@ func resourceRedisCache() *pluginsdk.Resource { Computed: true, }, - "preferred_data_persistence_auth_method": { + "data_persistence_authentication_method": { Type: pluginsdk.TypeString, Optional: true, Default: "SAS", @@ -840,7 +840,7 @@ func expandRedisConfiguration(d *pluginsdk.ResourceData) (*redis.RedisCommonProp output.MaxmemoryPolicy = utils.String(v) } - if v := raw["preferred_data_persistence_auth_method"].(string); v != "" { + if v := raw["data_persistence_authentication_method"].(string); v != "" { output.PreferredDataPersistenceAuthMethod = utils.String(v) } @@ -1015,7 +1015,7 @@ func flattenRedisConfiguration(input *redis.RedisCommonPropertiesRedisConfigurat } if input.PreferredDataPersistenceAuthMethod != nil { - outputs["preferred_data_persistence_auth_method"] = *input.PreferredDataPersistenceAuthMethod + outputs["data_persistence_authentication_method"] = *input.PreferredDataPersistenceAuthMethod } if input.MaxfragmentationmemoryReserved != nil { diff --git a/internal/services/redis/redis_cache_resource_test.go b/internal/services/redis/redis_cache_resource_test.go index 434ede5c0074..241a28b42f52 100644 --- a/internal/services/redis/redis_cache_resource_test.go +++ b/internal/services/redis/redis_cache_resource_test.go @@ -48,7 +48,7 @@ func TestAccRedisCache_managedIdentityAuth(t *testing.T) { check.That(data.ResourceName).Key("minimum_tls_version").Exists(), check.That(data.ResourceName).Key("primary_connection_string").Exists(), check.That(data.ResourceName).Key("secondary_connection_string").Exists(), - check.That(data.ResourceName).Key("redis_configuration.0.preferred_data_persistence_auth_method").HasValue("ManagedIdentity"), + check.That(data.ResourceName).Key("redis_configuration.0.data_persistence_authentication_method").HasValue("ManagedIdentity"), ), }, data.ImportStep(), @@ -624,7 +624,7 @@ resource "azurerm_redis_cache" "test" { minimum_tls_version = "1.2" redis_configuration { - preferred_data_persistence_auth_method = "ManagedIdentity" + data_persistence_authentication_method = "ManagedIdentity" } } `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, !requireSSL) diff --git a/website/docs/r/redis_cache.html.markdown b/website/docs/r/redis_cache.html.markdown index 9e8a8d0fe31e..45811986fd2c 100644 --- a/website/docs/r/redis_cache.html.markdown +++ b/website/docs/r/redis_cache.html.markdown @@ -146,7 +146,7 @@ redis_configuration { * `maxmemory_delta` - (Optional) The max-memory delta for this Redis instance. Defaults are shown below. * `maxmemory_policy` - (Optional) How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`. -* `preferred_data_persistence_auth_method` - (Optional) Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`. +* `data_persistence_authentication_method` - (Optional) Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. Defaults to `SAS`. * `maxfragmentationmemory_reserved` - (Optional) Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.