We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Microsoft SQL Azure Database Server.
Note: This resource provides usage of Microsoft SQL Azure Database server using an older
skubased model. It is recommended going forward to useazure.mssql.Serverresource which provides support forvcores.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleSqlServer = new Azure.Sql.SqlServer("exampleSqlServer", new Azure.Sql.SqlServerArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "mradministrator",
AdministratorLoginPassword = "thisIsDog11",
Tags =
{
{ "environment", "production" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("mradministrator"),
AdministratorLoginPassword: pulumi.String("thisIsDog11"),
Tags: pulumi.StringMap{
"environment": pulumi.String("production"),
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "mradministrator",
administratorLoginPassword: "thisIsDog11",
tags: {
environment: "production",
},
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_sql_server = azure.sql.SqlServer("exampleSqlServer",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
version="12.0",
administrator_login="mradministrator",
administrator_login_password="thisIsDog11",
tags={
"environment": "production",
})
Example coming soon!
Create SqlServer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlServer(name: string, args: SqlServerArgs, opts?: CustomResourceOptions);@overload
def SqlServer(resource_name: str,
args: SqlServerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SqlServer(resource_name: str,
opts: Optional[ResourceOptions] = None,
administrator_login: Optional[str] = None,
administrator_login_password: Optional[str] = None,
resource_group_name: Optional[str] = None,
version: Optional[str] = None,
connection_policy: Optional[str] = None,
extended_auditing_policy: Optional[SqlServerExtendedAuditingPolicyArgs] = None,
identity: Optional[SqlServerIdentityArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
threat_detection_policy: Optional[SqlServerThreatDetectionPolicyArgs] = None)func NewSqlServer(ctx *Context, name string, args SqlServerArgs, opts ...ResourceOption) (*SqlServer, error)public SqlServer(string name, SqlServerArgs args, CustomResourceOptions? opts = null)
public SqlServer(String name, SqlServerArgs args)
public SqlServer(String name, SqlServerArgs args, CustomResourceOptions options)
type: azure:sql:SqlServer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SqlServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SqlServerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SqlServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlServerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sqlServerResource = new Azure.Sql.SqlServer("sqlServerResource", new()
{
AdministratorLogin = "string",
AdministratorLoginPassword = "string",
ResourceGroupName = "string",
Version = "string",
ConnectionPolicy = "string",
Identity = new Azure.Sql.Inputs.SqlServerIdentityArgs
{
Type = "string",
PrincipalId = "string",
TenantId = "string",
},
Location = "string",
Name = "string",
Tags =
{
{ "string", "string" },
},
ThreatDetectionPolicy = new Azure.Sql.Inputs.SqlServerThreatDetectionPolicyArgs
{
DisabledAlerts = new[]
{
"string",
},
EmailAccountAdmins = false,
EmailAddresses = new[]
{
"string",
},
RetentionDays = 0,
State = "string",
StorageAccountAccessKey = "string",
StorageEndpoint = "string",
},
});
example, err := sql.NewSqlServer(ctx, "sqlServerResource", &sql.SqlServerArgs{
AdministratorLogin: pulumi.String("string"),
AdministratorLoginPassword: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Version: pulumi.String("string"),
ConnectionPolicy: pulumi.String("string"),
Identity: &sql.SqlServerIdentityArgs{
Type: pulumi.String("string"),
PrincipalId: pulumi.String("string"),
TenantId: pulumi.String("string"),
},
Location: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
ThreatDetectionPolicy: &sql.SqlServerThreatDetectionPolicyArgs{
DisabledAlerts: pulumi.StringArray{
pulumi.String("string"),
},
EmailAccountAdmins: pulumi.Bool(false),
EmailAddresses: pulumi.StringArray{
pulumi.String("string"),
},
RetentionDays: pulumi.Int(0),
State: pulumi.String("string"),
StorageAccountAccessKey: pulumi.String("string"),
StorageEndpoint: pulumi.String("string"),
},
})
var sqlServerResource = new SqlServer("sqlServerResource", SqlServerArgs.builder()
.administratorLogin("string")
.administratorLoginPassword("string")
.resourceGroupName("string")
.version("string")
.connectionPolicy("string")
.identity(SqlServerIdentityArgs.builder()
.type("string")
.principalId("string")
.tenantId("string")
.build())
.location("string")
.name("string")
.tags(Map.of("string", "string"))
.threatDetectionPolicy(SqlServerThreatDetectionPolicyArgs.builder()
.disabledAlerts("string")
.emailAccountAdmins(false)
.emailAddresses("string")
.retentionDays(0)
.state("string")
.storageAccountAccessKey("string")
.storageEndpoint("string")
.build())
.build());
sql_server_resource = azure.sql.SqlServer("sqlServerResource",
administrator_login="string",
administrator_login_password="string",
resource_group_name="string",
version="string",
connection_policy="string",
identity={
"type": "string",
"principal_id": "string",
"tenant_id": "string",
},
location="string",
name="string",
tags={
"string": "string",
},
threat_detection_policy={
"disabled_alerts": ["string"],
"email_account_admins": False,
"email_addresses": ["string"],
"retention_days": 0,
"state": "string",
"storage_account_access_key": "string",
"storage_endpoint": "string",
})
const sqlServerResource = new azure.sql.SqlServer("sqlServerResource", {
administratorLogin: "string",
administratorLoginPassword: "string",
resourceGroupName: "string",
version: "string",
connectionPolicy: "string",
identity: {
type: "string",
principalId: "string",
tenantId: "string",
},
location: "string",
name: "string",
tags: {
string: "string",
},
threatDetectionPolicy: {
disabledAlerts: ["string"],
emailAccountAdmins: false,
emailAddresses: ["string"],
retentionDays: 0,
state: "string",
storageAccountAccessKey: "string",
storageEndpoint: "string",
},
});
type: azure:sql:SqlServer
properties:
administratorLogin: string
administratorLoginPassword: string
connectionPolicy: string
identity:
principalId: string
tenantId: string
type: string
location: string
name: string
resourceGroupName: string
tags:
string: string
threatDetectionPolicy:
disabledAlerts:
- string
emailAccountAdmins: false
emailAddresses:
- string
retentionDays: 0
state: string
storageAccountAccessKey: string
storageEndpoint: string
version: string
SqlServer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SqlServer resource accepts the following input properties:
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- Connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - Extended
Auditing SqlPolicy Server Extended Auditing Policy - Identity
Sql
Server Identity - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- Connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - Extended
Auditing SqlPolicy Server Extended Auditing Policy Args - Identity
Sql
Server Identity Args - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- map[string]string
- A mapping of tags to assign to the resource.
- Threat
Detection SqlPolicy Server Threat Detection Policy Args - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server.
- version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- connection
Policy String - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing SqlPolicy Server Extended Auditing Policy - identity
Sql
Server Identity - An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Map<String,String>
- A mapping of tags to assign to the resource.
- threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
- administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing SqlPolicy Server Extended Auditing Policy - identity
Sql
Server Identity - An
identityblock as defined below. - location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
- administrator_
login str - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator_
login_ strpassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - resource_
group_ strname - The name of the resource group in which to create the Microsoft SQL Server.
- version str
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- connection_
policy str - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended_
auditing_ Sqlpolicy Server Extended Auditing Policy Args - identity
Sql
Server Identity Args - An
identityblock as defined below. - location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- threat_
detection_ Sqlpolicy Server Threat Detection Policy Args - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server.
- version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- connection
Policy String - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing Property MapPolicy - identity Property Map
- An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Map<String>
- A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlServer resource produces the following output properties:
- Fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Id string
- The provider-assigned unique ID for this managed resource.
- Fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Id string
- The provider-assigned unique ID for this managed resource.
- fully
Qualified StringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- id String
- The provider-assigned unique ID for this managed resource.
- fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- id string
- The provider-assigned unique ID for this managed resource.
- fully_
qualified_ strdomain_ name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- id str
- The provider-assigned unique ID for this managed resource.
- fully
Qualified StringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SqlServer Resource
Get an existing SqlServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SqlServerState, opts?: CustomResourceOptions): SqlServer@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
administrator_login: Optional[str] = None,
administrator_login_password: Optional[str] = None,
connection_policy: Optional[str] = None,
extended_auditing_policy: Optional[SqlServerExtendedAuditingPolicyArgs] = None,
fully_qualified_domain_name: Optional[str] = None,
identity: Optional[SqlServerIdentityArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
threat_detection_policy: Optional[SqlServerThreatDetectionPolicyArgs] = None,
version: Optional[str] = None) -> SqlServerfunc GetSqlServer(ctx *Context, name string, id IDInput, state *SqlServerState, opts ...ResourceOption) (*SqlServer, error)public static SqlServer Get(string name, Input<string> id, SqlServerState? state, CustomResourceOptions? opts = null)public static SqlServer get(String name, Output<String> id, SqlServerState state, CustomResourceOptions options)resources: _: type: azure:sql:SqlServer get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - Connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - Extended
Auditing SqlPolicy Server Extended Auditing Policy - Fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Identity
Sql
Server Identity - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- Administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- Administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - Connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - Extended
Auditing SqlPolicy Server Extended Auditing Policy Args - Fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Identity
Sql
Server Identity Args - An
identityblock as defined below. - Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- map[string]string
- A mapping of tags to assign to the resource.
- Threat
Detection SqlPolicy Server Threat Detection Policy Args - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - connection
Policy String - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing SqlPolicy Server Extended Auditing Policy - fully
Qualified StringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity
Sql
Server Identity - An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server.
- Map<String,String>
- A mapping of tags to assign to the resource.
- threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- administrator
Login string - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login stringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - connection
Policy string - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing SqlPolicy Server Extended Auditing Policy - fully
Qualified stringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity
Sql
Server Identity - An
identityblock as defined below. - location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- threat
Detection SqlPolicy Server Threat Detection Policy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- administrator_
login str - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator_
login_ strpassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - connection_
policy str - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended_
auditing_ Sqlpolicy Server Extended Auditing Policy Args - fully_
qualified_ strdomain_ name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity
Sql
Server Identity Args - An
identityblock as defined below. - location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- resource_
group_ strname - The name of the resource group in which to create the Microsoft SQL Server.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- threat_
detection_ Sqlpolicy Server Threat Detection Policy Args - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - version str
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
- administrator
Login String - The administrator login name for the new server. Changing this forces a new resource to be created.
- administrator
Login StringPassword - The password associated with the
administrator_loginuser. Needs to comply with Azure's Password Policy - connection
Policy String - The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault. - extended
Auditing Property MapPolicy - fully
Qualified StringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity Property Map
- An
identityblock as defined below. - location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name String
- The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
- resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server.
- Map<String>
- A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy - Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below. - version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
Supporting Types
SqlServerExtendedAuditingPolicy, SqlServerExtendedAuditingPolicyArgs
- Log
Monitoring boolEnabled - Retention
In intDays - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - Storage
Account boolAccess Key Is Secondary - Storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- Log
Monitoring boolEnabled - Retention
In intDays - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - Storage
Account boolAccess Key Is Secondary - Storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- log
Monitoring BooleanEnabled - retention
In IntegerDays - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Account BooleanAccess Key Is Secondary - storage
Endpoint String - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- log
Monitoring booleanEnabled - retention
In numberDays - storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Account booleanAccess Key Is Secondary - storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- log_
monitoring_ boolenabled - retention_
in_ intdays - storage_
account_ straccess_ key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage_
account_ boolaccess_ key_ is_ secondary - storage_
endpoint str - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- log
Monitoring BooleanEnabled - retention
In NumberDays - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Account BooleanAccess Key Is Secondary - storage
Endpoint String - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
SqlServerIdentity, SqlServerIdentityArgs
- Type string
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - Principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
- Type string
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - Principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
- type String
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - principal
Id String - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
- type string
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - principal
Id string - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- tenant
Id string - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
- type str
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - principal_
id str - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- tenant_
id str - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
- type String
- Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value is
SystemAssigned. - principal
Id String - The Principal ID for the Service Principal associated with the Identity of this SQL Server.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.
SqlServerThreatDetectionPolicy, SqlServerThreatDetectionPolicyArgs
- Disabled
Alerts List<string> - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - Email
Account boolAdmins - Should the account administrators be emailed when this alert is triggered?
- Email
Addresses List<string> - A list of email addresses which alerts should be sent to.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs.
- State string
- The State of the Policy. Possible values are
EnabledorDisabled. - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - Storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- Disabled
Alerts []string - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - Email
Account boolAdmins - Should the account administrators be emailed when this alert is triggered?
- Email
Addresses []string - A list of email addresses which alerts should be sent to.
- Retention
Days int - Specifies the number of days to keep in the Threat Detection audit logs.
- State string
- The State of the Policy. Possible values are
EnabledorDisabled. - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - Storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- disabled
Alerts List<String> - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - email
Account BooleanAdmins - Should the account administrators be emailed when this alert is triggered?
- email
Addresses List<String> - A list of email addresses which alerts should be sent to.
- retention
Days Integer - Specifies the number of days to keep in the Threat Detection audit logs.
- state String
- The State of the Policy. Possible values are
EnabledorDisabled. - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Endpoint String - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- disabled
Alerts string[] - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - email
Account booleanAdmins - Should the account administrators be emailed when this alert is triggered?
- email
Addresses string[] - A list of email addresses which alerts should be sent to.
- retention
Days number - Specifies the number of days to keep in the Threat Detection audit logs.
- state string
- The State of the Policy. Possible values are
EnabledorDisabled. - storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Endpoint string - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- disabled_
alerts Sequence[str] - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - email_
account_ booladmins - Should the account administrators be emailed when this alert is triggered?
- email_
addresses Sequence[str] - A list of email addresses which alerts should be sent to.
- retention_
days int - Specifies the number of days to keep in the Threat Detection audit logs.
- state str
- The State of the Policy. Possible values are
EnabledorDisabled. - storage_
account_ straccess_ key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage_
endpoint str - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
- disabled
Alerts List<String> - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Data_Exfiltration,Sql_Injection,Sql_Injection_VulnerabilityandUnsafe_Action",. - email
Account BooleanAdmins - Should the account administrators be emailed when this alert is triggered?
- email
Addresses List<String> - A list of email addresses which alerts should be sent to.
- retention
Days Number - Specifies the number of days to keep in the Threat Detection audit logs.
- state String
- The State of the Policy. Possible values are
EnabledorDisabled. - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled. - storage
Endpoint String - Specifies the blob storage endpoint (e.g.
https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required ifstateisEnabled.
Import
SQL Servers can be imported using the resource id, e.g.
$ pulumi import azure:sql/sqlServer:SqlServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
