1. Packages
  2. Azure Classic
  3. API Docs
  4. sql
  5. SqlServer

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.sql.SqlServer

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    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.

    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:

    AdministratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    ResourceGroupName string
    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.
    ConnectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    Identity SqlServerIdentity
    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.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy SqlServerThreatDetectionPolicy
    Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
    AdministratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    ResourceGroupName string
    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.
    ConnectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    Identity SqlServerIdentityArgs
    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.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy SqlServerThreatDetectionPolicyArgs
    Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
    administratorLogin String
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    resourceGroupName String
    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.
    connectionPolicy String
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    identity SqlServerIdentity
    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.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy SqlServerThreatDetectionPolicy
    Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
    administratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    resourceGroupName string
    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.
    connectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    identity SqlServerIdentity
    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.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy SqlServerThreatDetectionPolicy
    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_password str
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    resource_group_name str
    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, and Redirect. Defaults to Default.
    identity SqlServerIdentityArgs
    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.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy SqlServerThreatDetectionPolicyArgs
    Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
    administratorLogin String
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    resourceGroupName String
    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.
    connectionPolicy String
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    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.
    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    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:

    FullyQualifiedDomainName string
    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.
    FullyQualifiedDomainName string
    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.
    fullyQualifiedDomainName String
    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.
    fullyQualifiedDomainName string
    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_domain_name str
    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.
    fullyQualifiedDomainName String
    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.
    The following state arguments are supported:
    AdministratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    ConnectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    FullyQualifiedDomainName string
    The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
    Identity SqlServerIdentity
    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.
    ResourceGroupName string
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy SqlServerThreatDetectionPolicy
    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.
    AdministratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    ConnectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    FullyQualifiedDomainName string
    The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
    Identity SqlServerIdentityArgs
    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.
    ResourceGroupName string
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy SqlServerThreatDetectionPolicyArgs
    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.
    administratorLogin String
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    connectionPolicy String
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    fullyQualifiedDomainName String
    The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
    identity SqlServerIdentity
    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.
    resourceGroupName String
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy SqlServerThreatDetectionPolicy
    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.
    administratorLogin string
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    connectionPolicy string
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    fullyQualifiedDomainName string
    The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
    identity SqlServerIdentity
    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.
    resourceGroupName string
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy SqlServerThreatDetectionPolicy
    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_password str
    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, and Redirect. Defaults to Default.
    fully_qualified_domain_name str
    The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
    identity SqlServerIdentityArgs
    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_name str
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy SqlServerThreatDetectionPolicyArgs
    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.
    administratorLogin String
    The administrator login name for the new server. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The password associated with the administrator_login user. Needs to comply with Azure's Password Policy
    connectionPolicy String
    The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
    fullyQualifiedDomainName String
    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.
    resourceGroupName String
    The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    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 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.

    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this SQL Server.
    TenantId 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 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.

    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this SQL Server.
    TenantId 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 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.

    principalId String
    The Principal ID for the Service Principal associated with the Identity of this SQL Server.
    tenantId 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 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.

    principalId string
    The Principal ID for the Service Principal associated with the Identity of this SQL Server.
    tenantId 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 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.

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

    principalId String
    The Principal ID for the Service Principal associated with the Identity of this SQL Server.
    tenantId String
    The Tenant ID for the Service Principal associated with the Identity of this SQL Server.

    SqlServerThreatDetectionPolicy, SqlServerThreatDetectionPolicyArgs

    DisabledAlerts List<string>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Data_Exfiltration, Sql_Injection, Sql_Injection_Vulnerability and Unsafe_Action",.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses List<string>
    A list of email addresses which alerts should be sent to.
    RetentionDays 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 and New. Defaults to Disabled.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    StorageEndpoint 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 is Enabled.
    DisabledAlerts []string
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Data_Exfiltration, Sql_Injection, Sql_Injection_Vulnerability and Unsafe_Action",.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses []string
    A list of email addresses which alerts should be sent to.
    RetentionDays 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 and New. Defaults to Disabled.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    StorageEndpoint 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 is Enabled.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Data_Exfiltration, Sql_Injection, Sql_Injection_Vulnerability and Unsafe_Action",.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    retentionDays 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 and New. Defaults to Disabled.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    storageEndpoint 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 is Enabled.
    disabledAlerts string[]
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Data_Exfiltration, Sql_Injection, Sql_Injection_Vulnerability and Unsafe_Action",.
    emailAccountAdmins boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses string[]
    A list of email addresses which alerts should be sent to.
    retentionDays 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 and New. Defaults to Disabled.
    storageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    storageEndpoint 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 is Enabled.
    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 and Unsafe_Action",.
    email_account_admins bool
    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 and New. Defaults to Disabled.
    storage_account_access_key str
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    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 is Enabled.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Data_Exfiltration, Sql_Injection, Sql_Injection_Vulnerability and Unsafe_Action",.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    retentionDays 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 and New. Defaults to Disabled.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.
    storageEndpoint 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 is Enabled.

    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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi