Skip to content

Commit

Permalink
hashicorp#24317: renaming preferred_data_persistence_auth_method to d…
Browse files Browse the repository at this point in the history
…ata_persistence_authentication_method as per review
  • Loading branch information
harshavmb committed Feb 14, 2024
1 parent 703ad3a commit 7c9ab21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions internal/services/redis/redis_cache_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/redis/redis_cache_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/redis_cache.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 7c9ab21

Please sign in to comment.