Skip to content

Commit

Permalink
azurerm_redis_enterprise_cluster - minimum_tls_version no longer …
Browse files Browse the repository at this point in the history
…accepts `1.0` or `1.1` as a value in 5.0 (hashicorp#28444)
  • Loading branch information
ziyeqf authored Jan 9, 2025
1 parent 4f77fbc commit 19c9858
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/hashicorp/go-azure-sdk/resource-manager/redisenterprise/2024-10-01/redisenterprise"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
Expand All @@ -28,7 +29,7 @@ import (
)

func resourceRedisEnterpriseCluster() *pluginsdk.Resource {
return &pluginsdk.Resource{
resource := &pluginsdk.Resource{
Create: resourceRedisEnterpriseClusterCreate,
Read: resourceRedisEnterpriseClusterRead,
Update: resourceRedisEnterpriseClusterUpdate,
Expand Down Expand Up @@ -72,8 +73,6 @@ func resourceRedisEnterpriseCluster() *pluginsdk.Resource {
ForceNew: true,
Default: string(redisenterprise.TlsVersionOnePointTwo),
ValidateFunc: validation.StringInSlice([]string{
string(redisenterprise.TlsVersionOnePointZero),
string(redisenterprise.TlsVersionOnePointOne),
string(redisenterprise.TlsVersionOnePointTwo),
}, false),
},
Expand All @@ -86,6 +85,22 @@ func resourceRedisEnterpriseCluster() *pluginsdk.Resource {
"tags": commonschema.Tags(),
},
}

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

return resource
}

func resourceRedisEnterpriseClusterCreate(d *pluginsdk.ResourceData, meta interface{}) error {
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_enterprise_cluster`

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

### `azurerm_sentinel_alert_rule_fusion`

* The deprecated `name` property has been removed.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/redis_enterprise_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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.2`. Changing this forces a new Redis Enterprise Cluster to be created.

~> **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.

* `zones` - (Optional) Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created.

* `tags` - (Optional) A mapping of tags which should be assigned to the Redis Enterprise Cluster.
Expand Down

0 comments on commit 19c9858

Please sign in to comment.