We recommend using Azure Native.
azure.sql.SqlServer
Explore with Pulumi AI
Manages a Microsoft SQL Azure Database Server.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "database-rg",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "examplesa",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleSqlServer = new azure.sql.SqlServer("example", {
name: "mssqlserver",
resourceGroupName: example.name,
location: example.location,
version: "12.0",
administratorLogin: "mradministrator",
administratorLoginPassword: "thisIsDog11",
tags: {
environment: "production",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="database-rg",
location="West Europe")
example_account = azure.storage.Account("example",
name="examplesa",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS")
example_sql_server = azure.sql.SqlServer("example",
name="mssqlserver",
resource_group_name=example.name,
location=example.location,
version="12.0",
administrator_login="mradministrator",
administrator_login_password="thisIsDog11",
tags={
"environment": "production",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sql"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("database-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("examplesa"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = sql.NewSqlServer(ctx, "example", &sql.SqlServerArgs{
Name: pulumi.String("mssqlserver"),
ResourceGroupName: example.Name,
Location: example.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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "database-rg",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "examplesa",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleSqlServer = new Azure.Sql.SqlServer("example", new()
{
Name = "mssqlserver",
ResourceGroupName = example.Name,
Location = example.Location,
Version = "12.0",
AdministratorLogin = "mradministrator",
AdministratorLoginPassword = "thisIsDog11",
Tags =
{
{ "environment", "production" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.sql.SqlServer;
import com.pulumi.azure.sql.SqlServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("database-rg")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplesa")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()
.name("mssqlserver")
.resourceGroupName(example.name())
.location(example.location())
.version("12.0")
.administratorLogin("mradministrator")
.administratorLoginPassword("thisIsDog11")
.tags(Map.of("environment", "production"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: database-rg
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: examplesa
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
exampleSqlServer:
type: azure:sql:SqlServer
name: example
properties:
name: mssqlserver
resourceGroupName: ${example.name}
location: ${example.location}
version: '12.0'
administratorLogin: mradministrator
administratorLoginPassword: thisIsDog11
tags:
environment: production
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,
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=azure.sql.SqlServerIdentityArgs(
type="string",
principal_id="string",
tenant_id="string",
),
location="string",
name="string",
tags={
"string": "string",
},
threat_detection_policy=azure.sql.SqlServerThreatDetectionPolicyArgs(
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
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_login
user. 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. Changing this forces a new resource to be created.
- Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- Connection
Policy string - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - Identity
Sql
Server Identity - An
identity
block 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. Changing this forces a new resource to be created.
- 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_policy
block 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_login
user. 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. Changing this forces a new resource to be created.
- Version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- Connection
Policy string - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - Identity
Sql
Server Identity Args - An
identity
block 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. Changing this forces a new resource to be created.
- 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_policy
block 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_login
user. 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. Changing this forces a new resource to be created.
- version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- connection
Policy String - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - identity
Sql
Server Identity - An
identity
block 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. Changing this forces a new resource to be created.
- 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_policy
block 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_login
user. 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. Changing this forces a new resource to be created.
- version string
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- connection
Policy string - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - identity
Sql
Server Identity - An
identity
block 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. Changing this forces a new resource to be created.
- {[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_policy
block 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_login
user. 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. Changing this forces a new resource to be created.
- version str
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- connection_
policy str - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - identity
Sql
Server Identity Args - An
identity
block 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. Changing this forces a new resource to be created.
- 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_policy
block 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_login
user. 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. Changing this forces a new resource to be created.
- version String
- The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
- connection
Policy String - The connection policy the server will use. Possible values are
Default
,Proxy
, andRedirect
. Defaults toDefault
. - identity Property Map
- An
identity
block 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. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy - Threat detection policy configuration. The
threat_detection_policy
block 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,
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) -> SqlServer
func 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)
Resource lookup is not supported in YAML
- 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_login
user. 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
. - 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
identity
block 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. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- 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_policy
block 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). Changing this forces a new resource to be created.
- 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_login
user. 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
. - 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
identity
block 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. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- 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_policy
block 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). Changing this forces a new resource to be created.
- 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_login
user. 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
. - 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
identity
block 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. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- 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_policy
block 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). Changing this forces a new resource to be created.
- 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_login
user. 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
. - 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
identity
block 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. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- {[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_policy
block 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). Changing this forces a new resource to be created.
- 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_login
user. 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
. - 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
identity
block 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. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- 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_policy
block 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). Changing this forces a new resource to be created.
- 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_login
user. 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
. - fully
Qualified StringDomain Name - The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity Property Map
- An
identity
block 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. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy - Threat detection policy configuration. The
threat_detection_policy
block 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). Changing this forces a new resource to be created.
Supporting Types
SqlServerIdentity, SqlServerIdentityArgs
- Type string
Specifies the type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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 type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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 type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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 type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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 type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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 type of Managed Service Identity that should be configured on this SQL Server. The only possible value is
SystemAssigned
.NOTE: The assigned
principal_id
andtenant_id
can be retrieved after the identitytype
has been set toSystemAssigned
and the Microsoft SQL Server has been created. More details are available below.- 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_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
- Disabled
Alerts []string - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Data_Exfiltration
,Sql_Injection
,Sql_Injection_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - Storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - Storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
- disabled
Alerts List<String> - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Data_Exfiltration
,Sql_Injection
,Sql_Injection_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
- disabled
Alerts string[] - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Data_Exfiltration
,Sql_Injection
,Sql_Injection_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - storage
Account stringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - storage
Endpoint string - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
- disabled_
alerts Sequence[str] - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Data_Exfiltration
,Sql_Injection
,Sql_Injection_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - storage_
account_ straccess_ key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - storage_
endpoint str - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
- disabled
Alerts List<String> - Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Data_Exfiltration
,Sql_Injection
,Sql_Injection_Vulnerability
andUnsafe_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
Disabled
,Enabled
andNew
. Defaults toDisabled
. - storage
Account StringAccess Key - Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
. - storage
Endpoint String - Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
state
isEnabled
.
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
azurerm
Terraform Provider.