Skip to content

Commit

Permalink
Deprecate use_server_default based on Azure/azure-rest-api-specs#97…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aris van Ommeren committed Oct 6, 2021
1 parent 7ec6428 commit 66dbf2a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
13 changes: 13 additions & 0 deletions internal/services/mssql/mssql_database_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,19 @@ func resourceMsSqlDatabase() *pluginsdk.Resource {
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},

// TODO - 3.0: Remove this property
"use_server_default": {
Type: pluginsdk.TypeString,
Optional: true,
DiffSuppressFunc: suppress.CaseDifference,
Default: "Disabled",
ValidateFunc: validation.StringInSlice([]string{
"Disabled",
"Enabled",
}, true),
Deprecated: "This field is now non-functional and thus will be removed in version 3.0 of the Azure Provider",
},
},
},
},
Expand Down
1 change: 0 additions & 1 deletion internal/services/mssql/mssql_database_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,6 @@ resource "azurerm_mssql_database" "test" {
email_account_admins = "Enabled"
storage_account_access_key = azurerm_storage_account.test.primary_access_key
storage_endpoint = azurerm_storage_account.test.primary_blob_endpoint
use_server_default = "Disabled"
}
tags = {
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/mssql_database.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ a `threat_detection_policy` block supports the following:
* `retention_days` - (Optional) Specifies the number of days to keep in the Threat Detection audit logs.
* `storage_account_access_key` - (Optional) Specifies the identifier key of the Threat Detection audit storage account. Required if `state` is `Enabled`.
* `storage_endpoint` - (Optional) Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if `state` is `Enabled`.
* `use_server_default` - (Optional) Should the default server policy be used? Defaults to `Disabled`.

---

Expand Down

0 comments on commit 66dbf2a

Please sign in to comment.