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_mssql_managed_instance - minimum_tls_version no longer accepts 1.0 or 1.1 as a value in 5.0 #28243

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
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/maintenance/2023-04-01/publicmaintenanceconfigurations"
"github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/managedinstances"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/mssqlmanagedinstance/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
Expand Down Expand Up @@ -81,7 +82,7 @@ func (r MsSqlManagedInstanceResource) IDValidationFunc() pluginsdk.SchemaValidat
}

func (r MsSqlManagedInstanceResource) Arguments() map[string]*pluginsdk.Schema {
return map[string]*pluginsdk.Schema{
args := map[string]*pluginsdk.Schema{
"name": {
Type: schema.TypeString,
Required: true,
Expand Down Expand Up @@ -200,8 +201,6 @@ func (r MsSqlManagedInstanceResource) Arguments() map[string]*pluginsdk.Schema {
Optional: true,
Default: "1.2",
ValidateFunc: validation.StringInSlice([]string{
"1.0",
"1.1",
"1.2",
}, false),
},
Expand Down Expand Up @@ -259,6 +258,20 @@ func (r MsSqlManagedInstanceResource) Arguments() map[string]*pluginsdk.Schema {

"tags": tags.Schema(),
}

if !features.FivePointOhBeta() {
args["minimum_tls_version"] = &pluginsdk.Schema{
Type: schema.TypeString,
Optional: true,
Default: "1.2",
ValidateFunc: validation.StringInSlice([]string{
"1.0",
"1.1",
"1.2",
}, false),
}
}
return args
}

func (r MsSqlManagedInstanceResource) Attributes() map[string]*pluginsdk.Schema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ resource "azurerm_mssql_managed_instance" "test" {
storage_size_in_gb = 32
subnet_id = azurerm_subnet.test.id
vcores = 4
timezone_id = "Pacific Standard Time"

administrator_login = "missadministrator"
administrator_login_password = "NCC-1701-D"
Expand Down Expand Up @@ -554,14 +553,13 @@ resource "azurerm_mssql_managed_instance" "test" {
location = azurerm_resource_group.test.location

license_type = "BasePrice"
minimum_tls_version = "1.0"
minimum_tls_version = "1.2"
proxy_override = "Proxy"
public_data_endpoint_enabled = true
sku_name = "GP_Gen5"
storage_account_type = "ZRS"
storage_size_in_gb = 64
subnet_id = azurerm_subnet.test.id
timezone_id = "Pacific Standard Time"
vcores = 8
zone_redundant_enabled = true

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 @@ -120,6 +120,10 @@ Please follow the format in the example below for listing breaking changes in re

* The properties `weekly_retention`, `monthly_retention` and `yearly_retention` now default to `PT0S`.

### `azurerm_mssql_managed_instance`

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

### `azurerm_mssql_server`

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

* `minimum_tls_version` - (Optional) The Minimum TLS Version. Default value is `1.2` Valid values include `1.0`, `1.1`, `1.2`.

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

* `proxy_override` - (Optional) Specifies how the SQL Managed Instance will be accessed. Default value is `Default`. Valid values include `Default`, `Proxy`, and `Redirect`.

* `public_data_endpoint_enabled` - (Optional) Is the public data endpoint enabled? Default value is `false`.
Expand Down
Loading