Skip to content

Commit

Permalink
azurerm_redis_cache - minimum_tls_version no longer accepts 1.0
Browse files Browse the repository at this point in the history
…or `1.1` as a value in 5.0 (#28443)

* `azurerm_redis_cache` - `minimum_tls_version` no longer accepts `1.0` or `1.1` as a value in 5.0

* golint
  • Loading branch information
ziyeqf authored Jan 10, 2025
1 parent 38cba6f commit d50951d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
16 changes: 14 additions & 2 deletions internal/services/redis/redis_cache_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/locks"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/network"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/redis/migration"
Expand Down Expand Up @@ -104,8 +105,6 @@ func resourceRedisCache() *pluginsdk.Resource {
Optional: true,
Default: string(redis.TlsVersionOnePointTwo),
ValidateFunc: validation.StringInSlice([]string{
string(redis.TlsVersionOnePointZero),
string(redis.TlsVersionOnePointOne),
string(redis.TlsVersionOnePointTwo),
}, false),
},
Expand Down Expand Up @@ -398,6 +397,19 @@ func resourceRedisCache() *pluginsdk.Resource {
),
}

if !features.FivePointOhBeta() {
resource.Schema["minimum_tls_version"] = &pluginsdk.Schema{
Type: pluginsdk.TypeString,
Optional: true,
Default: string(redis.TlsVersionOnePointTwo),
ValidateFunc: validation.StringInSlice([]string{
string(redis.TlsVersionOnePointZero),
string(redis.TlsVersionOnePointOne),
string(redis.TlsVersionOnePointTwo),
}, false),
}
}

return resource
}

Expand Down
4 changes: 4 additions & 0 deletions website/docs/5.0-upgrade-guide.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ Please follow the format in the example below for listing breaking changes in re
* The deprecated `logging_storage_account` block has been removed in favour of the `azurerm_monitor_diagnostic_setting` resource.
* The deprecated `managed_resource_group` property has been removed.

### `azurerm_redis_cache`

* The property `minimum_tls_version` no longer accepts `1.0` or `1.1` as a value.

### `azurerm_redis_enterprise_cluster`

* The property `minimum_tls_version` property no longer accepts `1.0` or `1.1` as a value.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/redis_cache.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ The following arguments are supported:

* `minimum_tls_version` - (Optional) The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`.

~> **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.

* `patch_schedule` - (Optional) A list of `patch_schedule` blocks as defined below.

* `private_static_ip_address` - (Optional) The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnet_id`. Changing this forces a new resource to be created.
Expand Down

0 comments on commit d50951d

Please sign in to comment.