The following arguments are supported:
An identity block supports the following:
NOTE:
The assigned principal_id and tenant_id can be retrieved after the identity type has been set to SystemAssigned and the Microsoft SQL Server has been created. More details are available below.
The threat_detection_policy block supports the following:
resource "azurerm_resource_group" "example" {
name = "database-rg"
location = "West Europe"
}
resource "azurerm_storage_account" "example" {
name = "examplesa"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_sql_server" "example" {
name = "mssqlserver"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
version = "12.0"
administrator_login = "mradministrator"
administrator_login_password = "thisIsDog11"
tags = {
environment = "production"
}
}
az sql server create --name
--resource-group
[--admin-password]
[--admin-user]
[--assign-identity]
[--enable-ad-only-auth]
[--enable-public-network {false, true}]
[--external-admin-name]
[--external-admin-principal-type]
[--external-admin-sid]
[--federated-client-id]
[--identity-type {None, SystemAssigned, SystemAssigned,UserAssigned, UserAssigned}]
[--key-id]
[--location]
[--minimal-tls-version {1.0, 1.1, 1.2}]
[--no-wait]
[--pid]
[--restrict-outbound-network-access {false, true}]
[--user-assigned-identity-id]
az sql server create -l westus -g mygroup -n myserver -u myadminuser -p myadminpassword
Categorized by Availability, Security & Compliance and Cost