Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_redis_cache - minimum_tls_version no longer accepts 1.0or 1.1 as a value in 5.0 #28443

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading