We recommend using Azure Native.
azure.mssql.Server
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 exampleServer = new azure.mssql.Server("example", {
    name: "mssqlserver",
    resourceGroupName: example.name,
    location: example.location,
    version: "12.0",
    administratorLogin: "missadministrator",
    administratorLoginPassword: "thisIsKat11",
    minimumTlsVersion: "1.2",
    azureadAdministrator: {
        loginUsername: "AzureAD Admin",
        objectId: "00000000-0000-0000-0000-000000000000",
    },
    tags: {
        environment: "production",
    },
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="database-rg",
    location="West Europe")
example_server = azure.mssql.Server("example",
    name="mssqlserver",
    resource_group_name=example.name,
    location=example.location,
    version="12.0",
    administrator_login="missadministrator",
    administrator_login_password="thisIsKat11",
    minimum_tls_version="1.2",
    azuread_administrator={
        "login_username": "AzureAD Admin",
        "object_id": "00000000-0000-0000-0000-000000000000",
    },
    tags={
        "environment": "production",
    })
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
	"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 = mssql.NewServer(ctx, "example", &mssql.ServerArgs{
			Name:                       pulumi.String("mssqlserver"),
			ResourceGroupName:          example.Name,
			Location:                   example.Location,
			Version:                    pulumi.String("12.0"),
			AdministratorLogin:         pulumi.String("missadministrator"),
			AdministratorLoginPassword: pulumi.String("thisIsKat11"),
			MinimumTlsVersion:          pulumi.String("1.2"),
			AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
				LoginUsername: pulumi.String("AzureAD Admin"),
				ObjectId:      pulumi.String("00000000-0000-0000-0000-000000000000"),
			},
			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 exampleServer = new Azure.MSSql.Server("example", new()
    {
        Name = "mssqlserver",
        ResourceGroupName = example.Name,
        Location = example.Location,
        Version = "12.0",
        AdministratorLogin = "missadministrator",
        AdministratorLoginPassword = "thisIsKat11",
        MinimumTlsVersion = "1.2",
        AzureadAdministrator = new Azure.MSSql.Inputs.ServerAzureadAdministratorArgs
        {
            LoginUsername = "AzureAD Admin",
            ObjectId = "00000000-0000-0000-0000-000000000000",
        },
        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.mssql.Server;
import com.pulumi.azure.mssql.ServerArgs;
import com.pulumi.azure.mssql.inputs.ServerAzureadAdministratorArgs;
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 exampleServer = new Server("exampleServer", ServerArgs.builder()
            .name("mssqlserver")
            .resourceGroupName(example.name())
            .location(example.location())
            .version("12.0")
            .administratorLogin("missadministrator")
            .administratorLoginPassword("thisIsKat11")
            .minimumTlsVersion("1.2")
            .azureadAdministrator(ServerAzureadAdministratorArgs.builder()
                .loginUsername("AzureAD Admin")
                .objectId("00000000-0000-0000-0000-000000000000")
                .build())
            .tags(Map.of("environment", "production"))
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: database-rg
      location: West Europe
  exampleServer:
    type: azure:mssql:Server
    name: example
    properties:
      name: mssqlserver
      resourceGroupName: ${example.name}
      location: ${example.location}
      version: '12.0'
      administratorLogin: missadministrator
      administratorLoginPassword: thisIsKat11
      minimumTlsVersion: '1.2'
      azureadAdministrator:
        loginUsername: AzureAD Admin
        objectId: 00000000-0000-0000-0000-000000000000
      tags:
        environment: production
Transparent Data Encryption(TDE) With A Customer Managed Key(CMK) During Create
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
    name: "example-admin",
    location: example.location,
    resourceGroupName: example.name,
});
// Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
const exampleKeyVault = new azure.keyvault.KeyVault("example", {
    name: "mssqltdeexample",
    location: example.location,
    resourceGroupName: example.name,
    enabledForDiskEncryption: true,
    tenantId: exampleUserAssignedIdentity.tenantId,
    softDeleteRetentionDays: 7,
    purgeProtectionEnabled: true,
    skuName: "standard",
    accessPolicies: [
        {
            tenantId: current.then(current => current.tenantId),
            objectId: current.then(current => current.objectId),
            keyPermissions: [
                "Get",
                "List",
                "Create",
                "Delete",
                "Update",
                "Recover",
                "Purge",
                "GetRotationPolicy",
            ],
        },
        {
            tenantId: exampleUserAssignedIdentity.tenantId,
            objectId: exampleUserAssignedIdentity.principalId,
            keyPermissions: [
                "Get",
                "WrapKey",
                "UnwrapKey",
            ],
        },
    ],
});
const exampleKey = new azure.keyvault.Key("example", {
    name: "example-key",
    keyVaultId: exampleKeyVault.id,
    keyType: "RSA",
    keySize: 2048,
    keyOpts: [
        "unwrapKey",
        "wrapKey",
    ],
}, {
    dependsOn: [exampleKeyVault],
});
const exampleServer = new azure.mssql.Server("example", {
    name: "example-resource",
    resourceGroupName: example.name,
    location: example.location,
    version: "12.0",
    administratorLogin: "Example-Administrator",
    administratorLoginPassword: "Example_Password!",
    minimumTlsVersion: "1.2",
    azureadAdministrator: {
        loginUsername: exampleUserAssignedIdentity.name,
        objectId: exampleUserAssignedIdentity.principalId,
    },
    identity: {
        type: "UserAssigned",
        identityIds: [exampleUserAssignedIdentity.id],
    },
    primaryUserAssignedIdentityId: exampleUserAssignedIdentity.id,
    transparentDataEncryptionKeyVaultKeyId: exampleKey.id,
});
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
    name="example-admin",
    location=example.location,
    resource_group_name=example.name)
# Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
example_key_vault = azure.keyvault.KeyVault("example",
    name="mssqltdeexample",
    location=example.location,
    resource_group_name=example.name,
    enabled_for_disk_encryption=True,
    tenant_id=example_user_assigned_identity.tenant_id,
    soft_delete_retention_days=7,
    purge_protection_enabled=True,
    sku_name="standard",
    access_policies=[
        {
            "tenant_id": current.tenant_id,
            "object_id": current.object_id,
            "key_permissions": [
                "Get",
                "List",
                "Create",
                "Delete",
                "Update",
                "Recover",
                "Purge",
                "GetRotationPolicy",
            ],
        },
        {
            "tenant_id": example_user_assigned_identity.tenant_id,
            "object_id": example_user_assigned_identity.principal_id,
            "key_permissions": [
                "Get",
                "WrapKey",
                "UnwrapKey",
            ],
        },
    ])
example_key = azure.keyvault.Key("example",
    name="example-key",
    key_vault_id=example_key_vault.id,
    key_type="RSA",
    key_size=2048,
    key_opts=[
        "unwrapKey",
        "wrapKey",
    ],
    opts = pulumi.ResourceOptions(depends_on=[example_key_vault]))
example_server = azure.mssql.Server("example",
    name="example-resource",
    resource_group_name=example.name,
    location=example.location,
    version="12.0",
    administrator_login="Example-Administrator",
    administrator_login_password="Example_Password!",
    minimum_tls_version="1.2",
    azuread_administrator={
        "login_username": example_user_assigned_identity.name,
        "object_id": example_user_assigned_identity.principal_id,
    },
    identity={
        "type": "UserAssigned",
        "identity_ids": [example_user_assigned_identity.id],
    },
    primary_user_assigned_identity_id=example_user_assigned_identity.id,
    transparent_data_encryption_key_vault_key_id=example_key.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
			Name:              pulumi.String("example-admin"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		// Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
			Name:                     pulumi.String("mssqltdeexample"),
			Location:                 example.Location,
			ResourceGroupName:        example.Name,
			EnabledForDiskEncryption: pulumi.Bool(true),
			TenantId:                 exampleUserAssignedIdentity.TenantId,
			SoftDeleteRetentionDays:  pulumi.Int(7),
			PurgeProtectionEnabled:   pulumi.Bool(true),
			SkuName:                  pulumi.String("standard"),
			AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
				&keyvault.KeyVaultAccessPolicyArgs{
					TenantId: pulumi.String(current.TenantId),
					ObjectId: pulumi.String(current.ObjectId),
					KeyPermissions: pulumi.StringArray{
						pulumi.String("Get"),
						pulumi.String("List"),
						pulumi.String("Create"),
						pulumi.String("Delete"),
						pulumi.String("Update"),
						pulumi.String("Recover"),
						pulumi.String("Purge"),
						pulumi.String("GetRotationPolicy"),
					},
				},
				&keyvault.KeyVaultAccessPolicyArgs{
					TenantId: exampleUserAssignedIdentity.TenantId,
					ObjectId: exampleUserAssignedIdentity.PrincipalId,
					KeyPermissions: pulumi.StringArray{
						pulumi.String("Get"),
						pulumi.String("WrapKey"),
						pulumi.String("UnwrapKey"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
			Name:       pulumi.String("example-key"),
			KeyVaultId: exampleKeyVault.ID(),
			KeyType:    pulumi.String("RSA"),
			KeySize:    pulumi.Int(2048),
			KeyOpts: pulumi.StringArray{
				pulumi.String("unwrapKey"),
				pulumi.String("wrapKey"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleKeyVault,
		}))
		if err != nil {
			return err
		}
		_, err = mssql.NewServer(ctx, "example", &mssql.ServerArgs{
			Name:                       pulumi.String("example-resource"),
			ResourceGroupName:          example.Name,
			Location:                   example.Location,
			Version:                    pulumi.String("12.0"),
			AdministratorLogin:         pulumi.String("Example-Administrator"),
			AdministratorLoginPassword: pulumi.String("Example_Password!"),
			MinimumTlsVersion:          pulumi.String("1.2"),
			AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
				LoginUsername: exampleUserAssignedIdentity.Name,
				ObjectId:      exampleUserAssignedIdentity.PrincipalId,
			},
			Identity: &mssql.ServerIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				IdentityIds: pulumi.StringArray{
					exampleUserAssignedIdentity.ID(),
				},
			},
			PrimaryUserAssignedIdentityId:          exampleUserAssignedIdentity.ID(),
			TransparentDataEncryptionKeyVaultKeyId: exampleKey.ID(),
		})
		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 current = Azure.Core.GetClientConfig.Invoke();
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
    {
        Name = "example-admin",
        Location = example.Location,
        ResourceGroupName = example.Name,
    });
    // Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
    var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
    {
        Name = "mssqltdeexample",
        Location = example.Location,
        ResourceGroupName = example.Name,
        EnabledForDiskEncryption = true,
        TenantId = exampleUserAssignedIdentity.TenantId,
        SoftDeleteRetentionDays = 7,
        PurgeProtectionEnabled = true,
        SkuName = "standard",
        AccessPolicies = new[]
        {
            new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
            {
                TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
                ObjectId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
                KeyPermissions = new[]
                {
                    "Get",
                    "List",
                    "Create",
                    "Delete",
                    "Update",
                    "Recover",
                    "Purge",
                    "GetRotationPolicy",
                },
            },
            new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
            {
                TenantId = exampleUserAssignedIdentity.TenantId,
                ObjectId = exampleUserAssignedIdentity.PrincipalId,
                KeyPermissions = new[]
                {
                    "Get",
                    "WrapKey",
                    "UnwrapKey",
                },
            },
        },
    });
    var exampleKey = new Azure.KeyVault.Key("example", new()
    {
        Name = "example-key",
        KeyVaultId = exampleKeyVault.Id,
        KeyType = "RSA",
        KeySize = 2048,
        KeyOpts = new[]
        {
            "unwrapKey",
            "wrapKey",
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            exampleKeyVault,
        },
    });
    var exampleServer = new Azure.MSSql.Server("example", new()
    {
        Name = "example-resource",
        ResourceGroupName = example.Name,
        Location = example.Location,
        Version = "12.0",
        AdministratorLogin = "Example-Administrator",
        AdministratorLoginPassword = "Example_Password!",
        MinimumTlsVersion = "1.2",
        AzureadAdministrator = new Azure.MSSql.Inputs.ServerAzureadAdministratorArgs
        {
            LoginUsername = exampleUserAssignedIdentity.Name,
            ObjectId = exampleUserAssignedIdentity.PrincipalId,
        },
        Identity = new Azure.MSSql.Inputs.ServerIdentityArgs
        {
            Type = "UserAssigned",
            IdentityIds = new[]
            {
                exampleUserAssignedIdentity.Id,
            },
        },
        PrimaryUserAssignedIdentityId = exampleUserAssignedIdentity.Id,
        TransparentDataEncryptionKeyVaultKeyId = exampleKey.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;
import com.pulumi.azure.keyvault.Key;
import com.pulumi.azure.keyvault.KeyArgs;
import com.pulumi.azure.mssql.Server;
import com.pulumi.azure.mssql.ServerArgs;
import com.pulumi.azure.mssql.inputs.ServerAzureadAdministratorArgs;
import com.pulumi.azure.mssql.inputs.ServerIdentityArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
        final var current = CoreFunctions.getClientConfig();
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
            .name("example-admin")
            .location(example.location())
            .resourceGroupName(example.name())
            .build());
        // Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
        var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
            .name("mssqltdeexample")
            .location(example.location())
            .resourceGroupName(example.name())
            .enabledForDiskEncryption(true)
            .tenantId(exampleUserAssignedIdentity.tenantId())
            .softDeleteRetentionDays(7)
            .purgeProtectionEnabled(true)
            .skuName("standard")
            .accessPolicies(            
                KeyVaultAccessPolicyArgs.builder()
                    .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                    .objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
                    .keyPermissions(                    
                        "Get",
                        "List",
                        "Create",
                        "Delete",
                        "Update",
                        "Recover",
                        "Purge",
                        "GetRotationPolicy")
                    .build(),
                KeyVaultAccessPolicyArgs.builder()
                    .tenantId(exampleUserAssignedIdentity.tenantId())
                    .objectId(exampleUserAssignedIdentity.principalId())
                    .keyPermissions(                    
                        "Get",
                        "WrapKey",
                        "UnwrapKey")
                    .build())
            .build());
        var exampleKey = new Key("exampleKey", KeyArgs.builder()
            .name("example-key")
            .keyVaultId(exampleKeyVault.id())
            .keyType("RSA")
            .keySize(2048)
            .keyOpts(            
                "unwrapKey",
                "wrapKey")
            .build(), CustomResourceOptions.builder()
                .dependsOn(exampleKeyVault)
                .build());
        var exampleServer = new Server("exampleServer", ServerArgs.builder()
            .name("example-resource")
            .resourceGroupName(example.name())
            .location(example.location())
            .version("12.0")
            .administratorLogin("Example-Administrator")
            .administratorLoginPassword("Example_Password!")
            .minimumTlsVersion("1.2")
            .azureadAdministrator(ServerAzureadAdministratorArgs.builder()
                .loginUsername(exampleUserAssignedIdentity.name())
                .objectId(exampleUserAssignedIdentity.principalId())
                .build())
            .identity(ServerIdentityArgs.builder()
                .type("UserAssigned")
                .identityIds(exampleUserAssignedIdentity.id())
                .build())
            .primaryUserAssignedIdentityId(exampleUserAssignedIdentity.id())
            .transparentDataEncryptionKeyVaultKeyId(exampleKey.id())
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleUserAssignedIdentity:
    type: azure:authorization:UserAssignedIdentity
    name: example
    properties:
      name: example-admin
      location: ${example.location}
      resourceGroupName: ${example.name}
  exampleServer:
    type: azure:mssql:Server
    name: example
    properties:
      name: example-resource
      resourceGroupName: ${example.name}
      location: ${example.location}
      version: '12.0'
      administratorLogin: Example-Administrator
      administratorLoginPassword: Example_Password!
      minimumTlsVersion: '1.2'
      azureadAdministrator:
        loginUsername: ${exampleUserAssignedIdentity.name}
        objectId: ${exampleUserAssignedIdentity.principalId}
      identity:
        type: UserAssigned
        identityIds:
          - ${exampleUserAssignedIdentity.id}
      primaryUserAssignedIdentityId: ${exampleUserAssignedIdentity.id}
      transparentDataEncryptionKeyVaultKeyId: ${exampleKey.id}
  # Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
  exampleKeyVault:
    type: azure:keyvault:KeyVault
    name: example
    properties:
      name: mssqltdeexample
      location: ${example.location}
      resourceGroupName: ${example.name}
      enabledForDiskEncryption: true
      tenantId: ${exampleUserAssignedIdentity.tenantId}
      softDeleteRetentionDays: 7
      purgeProtectionEnabled: true
      skuName: standard
      accessPolicies:
        - tenantId: ${current.tenantId}
          objectId: ${current.objectId}
          keyPermissions:
            - Get
            - List
            - Create
            - Delete
            - Update
            - Recover
            - Purge
            - GetRotationPolicy
        - tenantId: ${exampleUserAssignedIdentity.tenantId}
          objectId: ${exampleUserAssignedIdentity.principalId}
          keyPermissions:
            - Get
            - WrapKey
            - UnwrapKey
  exampleKey:
    type: azure:keyvault:Key
    name: example
    properties:
      name: example-key
      keyVaultId: ${exampleKeyVault.id}
      keyType: RSA
      keySize: 2048
      keyOpts:
        - unwrapKey
        - wrapKey
    options:
      dependsOn:
        - ${exampleKeyVault}
variables:
  current:
    fn::invoke:
      function: azure:core:getClientConfig
      arguments: {}
Create Server Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Server(name: string, args: ServerArgs, opts?: CustomResourceOptions);@overload
def Server(resource_name: str,
           args: ServerArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Server(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           resource_group_name: Optional[str] = None,
           version: Optional[str] = None,
           connection_policy: Optional[str] = None,
           outbound_network_restriction_enabled: Optional[bool] = None,
           administrator_login: Optional[str] = None,
           identity: Optional[ServerIdentityArgs] = None,
           location: Optional[str] = None,
           minimum_tls_version: Optional[str] = None,
           name: Optional[str] = None,
           azuread_administrator: Optional[ServerAzureadAdministratorArgs] = None,
           primary_user_assigned_identity_id: Optional[str] = None,
           public_network_access_enabled: Optional[bool] = None,
           administrator_login_password_wo_version: Optional[int] = None,
           tags: Optional[Mapping[str, str]] = None,
           transparent_data_encryption_key_vault_key_id: Optional[str] = None,
           administrator_login_password: Optional[str] = None)func NewServer(ctx *Context, name string, args ServerArgs, opts ...ResourceOption) (*Server, error)public Server(string name, ServerArgs args, CustomResourceOptions? opts = null)
public Server(String name, ServerArgs args)
public Server(String name, ServerArgs args, CustomResourceOptions options)
type: azure:mssql:Server
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 ServerArgs
- 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 ServerArgs
- 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 ServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerArgs
- 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 exampleserverResourceResourceFromMssqlserver = new Azure.MSSql.Server("exampleserverResourceResourceFromMssqlserver", new()
{
    ResourceGroupName = "string",
    Version = "string",
    ConnectionPolicy = "string",
    OutboundNetworkRestrictionEnabled = false,
    AdministratorLogin = "string",
    Identity = new Azure.MSSql.Inputs.ServerIdentityArgs
    {
        Type = "string",
        IdentityIds = new[]
        {
            "string",
        },
        PrincipalId = "string",
        TenantId = "string",
    },
    Location = "string",
    MinimumTlsVersion = "string",
    Name = "string",
    AzureadAdministrator = new Azure.MSSql.Inputs.ServerAzureadAdministratorArgs
    {
        LoginUsername = "string",
        ObjectId = "string",
        AzureadAuthenticationOnly = false,
        TenantId = "string",
    },
    PrimaryUserAssignedIdentityId = "string",
    PublicNetworkAccessEnabled = false,
    AdministratorLoginPasswordWoVersion = 0,
    Tags = 
    {
        { "string", "string" },
    },
    TransparentDataEncryptionKeyVaultKeyId = "string",
    AdministratorLoginPassword = "string",
});
example, err := mssql.NewServer(ctx, "exampleserverResourceResourceFromMssqlserver", &mssql.ServerArgs{
	ResourceGroupName:                 pulumi.String("string"),
	Version:                           pulumi.String("string"),
	ConnectionPolicy:                  pulumi.String("string"),
	OutboundNetworkRestrictionEnabled: pulumi.Bool(false),
	AdministratorLogin:                pulumi.String("string"),
	Identity: &mssql.ServerIdentityArgs{
		Type: pulumi.String("string"),
		IdentityIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		PrincipalId: pulumi.String("string"),
		TenantId:    pulumi.String("string"),
	},
	Location:          pulumi.String("string"),
	MinimumTlsVersion: pulumi.String("string"),
	Name:              pulumi.String("string"),
	AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
		LoginUsername:             pulumi.String("string"),
		ObjectId:                  pulumi.String("string"),
		AzureadAuthenticationOnly: pulumi.Bool(false),
		TenantId:                  pulumi.String("string"),
	},
	PrimaryUserAssignedIdentityId:       pulumi.String("string"),
	PublicNetworkAccessEnabled:          pulumi.Bool(false),
	AdministratorLoginPasswordWoVersion: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TransparentDataEncryptionKeyVaultKeyId: pulumi.String("string"),
	AdministratorLoginPassword:             pulumi.String("string"),
})
var exampleserverResourceResourceFromMssqlserver = new Server("exampleserverResourceResourceFromMssqlserver", ServerArgs.builder()
    .resourceGroupName("string")
    .version("string")
    .connectionPolicy("string")
    .outboundNetworkRestrictionEnabled(false)
    .administratorLogin("string")
    .identity(ServerIdentityArgs.builder()
        .type("string")
        .identityIds("string")
        .principalId("string")
        .tenantId("string")
        .build())
    .location("string")
    .minimumTlsVersion("string")
    .name("string")
    .azureadAdministrator(ServerAzureadAdministratorArgs.builder()
        .loginUsername("string")
        .objectId("string")
        .azureadAuthenticationOnly(false)
        .tenantId("string")
        .build())
    .primaryUserAssignedIdentityId("string")
    .publicNetworkAccessEnabled(false)
    .administratorLoginPasswordWoVersion(0)
    .tags(Map.of("string", "string"))
    .transparentDataEncryptionKeyVaultKeyId("string")
    .administratorLoginPassword("string")
    .build());
exampleserver_resource_resource_from_mssqlserver = azure.mssql.Server("exampleserverResourceResourceFromMssqlserver",
    resource_group_name="string",
    version="string",
    connection_policy="string",
    outbound_network_restriction_enabled=False,
    administrator_login="string",
    identity={
        "type": "string",
        "identity_ids": ["string"],
        "principal_id": "string",
        "tenant_id": "string",
    },
    location="string",
    minimum_tls_version="string",
    name="string",
    azuread_administrator={
        "login_username": "string",
        "object_id": "string",
        "azuread_authentication_only": False,
        "tenant_id": "string",
    },
    primary_user_assigned_identity_id="string",
    public_network_access_enabled=False,
    administrator_login_password_wo_version=0,
    tags={
        "string": "string",
    },
    transparent_data_encryption_key_vault_key_id="string",
    administrator_login_password="string")
const exampleserverResourceResourceFromMssqlserver = new azure.mssql.Server("exampleserverResourceResourceFromMssqlserver", {
    resourceGroupName: "string",
    version: "string",
    connectionPolicy: "string",
    outboundNetworkRestrictionEnabled: false,
    administratorLogin: "string",
    identity: {
        type: "string",
        identityIds: ["string"],
        principalId: "string",
        tenantId: "string",
    },
    location: "string",
    minimumTlsVersion: "string",
    name: "string",
    azureadAdministrator: {
        loginUsername: "string",
        objectId: "string",
        azureadAuthenticationOnly: false,
        tenantId: "string",
    },
    primaryUserAssignedIdentityId: "string",
    publicNetworkAccessEnabled: false,
    administratorLoginPasswordWoVersion: 0,
    tags: {
        string: "string",
    },
    transparentDataEncryptionKeyVaultKeyId: "string",
    administratorLoginPassword: "string",
});
type: azure:mssql:Server
properties:
    administratorLogin: string
    administratorLoginPassword: string
    administratorLoginPasswordWoVersion: 0
    azureadAdministrator:
        azureadAuthenticationOnly: false
        loginUsername: string
        objectId: string
        tenantId: string
    connectionPolicy: string
    identity:
        identityIds:
            - string
        principalId: string
        tenantId: string
        type: string
    location: string
    minimumTlsVersion: string
    name: string
    outboundNetworkRestrictionEnabled: false
    primaryUserAssignedIdentityId: string
    publicNetworkAccessEnabled: false
    resourceGroupName: string
    tags:
        string: string
    transparentDataEncryptionKeyVaultKeyId: string
    version: string
Server 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 Server resource accepts the following input properties:
- ResourceGroup 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.
- AdministratorLogin string
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- AdministratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- AdministratorLogin intPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- AzureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- ConnectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- Identity
ServerIdentity 
- 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.
- MinimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- OutboundNetwork boolRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- PrimaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- PublicNetwork boolAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- TransparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- ResourceGroup 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.
- AdministratorLogin string
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- AdministratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- AdministratorLogin intPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- AzureadAdministrator ServerAzuread Administrator Args 
- An azuread_administratorblock as defined below.
- ConnectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- Identity
ServerIdentity 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.
- MinimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- OutboundNetwork boolRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- PrimaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- PublicNetwork boolAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- map[string]string
- A mapping of tags to assign to the resource.
- TransparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- resourceGroup 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.
- administratorLogin String
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin StringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin IntegerPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- connectionPolicy String
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- identity
ServerIdentity 
- 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.
- minimumTls StringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork BooleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser StringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork BooleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- Map<String,String>
- A mapping of tags to assign to the resource.
- transparentData StringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- resourceGroup 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.
- administratorLogin string
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin numberPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- connectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- identity
ServerIdentity 
- 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.
- minimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork booleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork booleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- transparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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.
- administrator_login str
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. 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.
- administrator_login_ intpassword_ wo_ version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azuread_administrator ServerAzuread Administrator Args 
- An azuread_administratorblock as defined below.
- connection_policy str
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- identity
ServerIdentity 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.
- minimum_tls_ strversion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outbound_network_ boolrestriction_ enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primary_user_ strassigned_ identity_ id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- public_network_ boolaccess_ enabled 
- Whether public network access is allowed for this server. Defaults to true.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- transparent_data_ strencryption_ key_ vault_ key_ id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- resourceGroup 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.
- administratorLogin String
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin StringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin NumberPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator Property Map
- An azuread_administratorblock as defined below.
- connectionPolicy String
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- 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.
- minimumTls StringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork BooleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser StringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork BooleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- Map<String>
- A mapping of tags to assign to the resource.
- transparentData StringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
Outputs
All input properties are implicitly available as output properties. Additionally, the Server resource produces the following output properties:
- FullyQualified 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.
- RestorableDropped List<string>Database Ids 
- A list of dropped restorable database IDs on the server.
- FullyQualified 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.
- RestorableDropped []stringDatabase Ids 
- A list of dropped restorable database IDs on the server.
- fullyQualified 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.
- restorableDropped List<String>Database Ids 
- A list of dropped restorable database IDs on the server.
- fullyQualified 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.
- restorableDropped string[]Database Ids 
- A list of dropped restorable database IDs on the server.
- 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.
- restorable_dropped_ Sequence[str]database_ ids 
- A list of dropped restorable database IDs on the server.
- fullyQualified 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.
- restorableDropped List<String>Database Ids 
- A list of dropped restorable database IDs on the server.
Look up Existing Server Resource
Get an existing Server 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?: ServerState, opts?: CustomResourceOptions): Server@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        administrator_login: Optional[str] = None,
        administrator_login_password: Optional[str] = None,
        administrator_login_password_wo_version: Optional[int] = None,
        azuread_administrator: Optional[ServerAzureadAdministratorArgs] = None,
        connection_policy: Optional[str] = None,
        fully_qualified_domain_name: Optional[str] = None,
        identity: Optional[ServerIdentityArgs] = None,
        location: Optional[str] = None,
        minimum_tls_version: Optional[str] = None,
        name: Optional[str] = None,
        outbound_network_restriction_enabled: Optional[bool] = None,
        primary_user_assigned_identity_id: Optional[str] = None,
        public_network_access_enabled: Optional[bool] = None,
        resource_group_name: Optional[str] = None,
        restorable_dropped_database_ids: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        transparent_data_encryption_key_vault_key_id: Optional[str] = None,
        version: Optional[str] = None) -> Serverfunc GetServer(ctx *Context, name string, id IDInput, state *ServerState, opts ...ResourceOption) (*Server, error)public static Server Get(string name, Input<string> id, ServerState? state, CustomResourceOptions? opts = null)public static Server get(String name, Output<String> id, ServerState state, CustomResourceOptions options)resources:  _:    type: azure:mssql:Server    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.
- AdministratorLogin string
- The administrator login name for the new server. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- AdministratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- AdministratorLogin intPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- AzureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- ConnectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- FullyQualified stringDomain Name 
- The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Identity
ServerIdentity 
- 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.
- MinimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- OutboundNetwork boolRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- PrimaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- PublicNetwork boolAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- ResourceGroup stringName 
- The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- RestorableDropped List<string>Database Ids 
- A list of dropped restorable database IDs on the server.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- TransparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- AdministratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- AdministratorLogin intPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- AzureadAdministrator ServerAzuread Administrator Args 
- An azuread_administratorblock as defined below.
- ConnectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- FullyQualified stringDomain Name 
- The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- Identity
ServerIdentity 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.
- MinimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- OutboundNetwork boolRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- PrimaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- PublicNetwork boolAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- ResourceGroup stringName 
- The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- RestorableDropped []stringDatabase Ids 
- A list of dropped restorable database IDs on the server.
- map[string]string
- A mapping of tags to assign to the resource.
- TransparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin StringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin IntegerPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- connectionPolicy String
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- fullyQualified StringDomain Name 
- The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity
ServerIdentity 
- 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.
- minimumTls StringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork BooleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser StringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork BooleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- resourceGroup StringName 
- The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- restorableDropped List<String>Database Ids 
- A list of dropped restorable database IDs on the server.
- Map<String,String>
- A mapping of tags to assign to the resource.
- transparentData StringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin stringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin numberPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator ServerAzuread Administrator 
- An azuread_administratorblock as defined below.
- connectionPolicy string
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- fullyQualified stringDomain Name 
- The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
- identity
ServerIdentity 
- 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.
- minimumTls stringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork booleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser stringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork booleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- resourceGroup stringName 
- The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- restorableDropped string[]Database Ids 
- A list of dropped restorable database IDs on the server.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- transparentData stringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. 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.
- administrator_login_ intpassword_ wo_ version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azuread_administrator ServerAzuread Administrator Args 
- An azuread_administratorblock as defined below.
- 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
ServerIdentity 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.
- minimum_tls_ strversion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outbound_network_ boolrestriction_ enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primary_user_ strassigned_ identity_ id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- public_network_ boolaccess_ enabled 
- Whether public network access is allowed for this server. Defaults to true.
- 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.
- restorable_dropped_ Sequence[str]database_ ids 
- A list of dropped restorable database IDs on the server.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- transparent_data_ strencryption_ key_ vault_ key_ id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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. Required unless azuread_authentication_onlyin theazuread_administratorblock istrue. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
- administratorLogin StringPassword 
- The password associated with the administrator_loginuser. Needs to comply with Azure's Password Policy.
- administratorLogin NumberPassword Wo Version 
- An integer value used to trigger an update for administrator_login_password_wo. This property should be incremented when updatingadministrator_login_password_wo.
- azureadAdministrator Property Map
- An azuread_administratorblock as defined below.
- connectionPolicy String
- The connection policy the server will use. Possible values are Default,Proxy, andRedirect. Defaults toDefault.
- fullyQualified 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.
- minimumTls StringVersion 
- The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: - 1.0,- 1.1,- 1.2and- Disabled. Defaults to- 1.2.- NOTE: The - minimum_tls_versionis set to- Disabledmeans all TLS versions are allowed. After you enforce a version of- minimum_tls_version, it's not possible to revert to- Disabled.- NOTE: Azure Services will require TLS 1.2+ by August 2025, please see this announcement for more. 
- 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.
- outboundNetwork BooleanRestriction Enabled 
- Whether outbound network traffic is restricted for this server. Defaults to false.
- primaryUser StringAssigned Identity Id 
- Specifies the primary user managed identity id. Required if typewithin theidentityblock is set to eitherSystemAssigned, UserAssignedorUserAssignedand should be set at same time as settingidentity_ids.
- publicNetwork BooleanAccess Enabled 
- Whether public network access is allowed for this server. Defaults to true.
- resourceGroup StringName 
- The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
- restorableDropped List<String>Database Ids 
- A list of dropped restorable database IDs on the server.
- Map<String>
- A mapping of tags to assign to the resource.
- transparentData StringEncryption Key Vault Key Id 
- The fully versioned - Key Vault- KeyURL (e.g.- 'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>) to be used as the- Customer Managed Key(CMK/BYOK) for the- Transparent Data Encryption(TDE) layer.- NOTE: To successfully deploy a - Microsoft SQL Serverin CMK/BYOK TDE the- Key Vaultmust have- Soft-deleteand- purge protectionenabled to protect from data loss due to accidental key and/or key vault deletion. The- Key Vaultand the- Microsoft SQL Server- User Managed Identity Instancemust belong to the same- Azure Active Directory- tenant.- NOTE: Cross-tenant - Key Vaultand- Microsoft SQL Serverinteractions are not supported. Please see the product documentation for more information.- NOTE: When using a firewall with a - Key Vault, you must enable the option- Allow trusted Microsoft services to bypass the firewall.
- 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
ServerAzureadAdministrator, ServerAzureadAdministratorArgs      
- LoginUsername string
- The login username of the Azure AD Administrator of this SQL Server.
- ObjectId string
- The object id of the Azure AD Administrator of this SQL Server.
- AzureadAuthentication boolOnly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- TenantId string
- The tenant id of the Azure AD Administrator of this SQL Server.
- LoginUsername string
- The login username of the Azure AD Administrator of this SQL Server.
- ObjectId string
- The object id of the Azure AD Administrator of this SQL Server.
- AzureadAuthentication boolOnly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- TenantId string
- The tenant id of the Azure AD Administrator of this SQL Server.
- loginUsername String
- The login username of the Azure AD Administrator of this SQL Server.
- objectId String
- The object id of the Azure AD Administrator of this SQL Server.
- azureadAuthentication BooleanOnly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- tenantId String
- The tenant id of the Azure AD Administrator of this SQL Server.
- loginUsername string
- The login username of the Azure AD Administrator of this SQL Server.
- objectId string
- The object id of the Azure AD Administrator of this SQL Server.
- azureadAuthentication booleanOnly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- tenantId string
- The tenant id of the Azure AD Administrator of this SQL Server.
- login_username str
- The login username of the Azure AD Administrator of this SQL Server.
- object_id str
- The object id of the Azure AD Administrator of this SQL Server.
- azuread_authentication_ boolonly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- tenant_id str
- The tenant id of the Azure AD Administrator of this SQL Server.
- loginUsername String
- The login username of the Azure AD Administrator of this SQL Server.
- objectId String
- The object id of the Azure AD Administrator of this SQL Server.
- azureadAuthentication BooleanOnly 
- Specifies whether only AD Users and administrators (e.g. azuread_administrator[0].login_username) can be used to login, or also local database users (e.g.administrator_login). Whentrue, theadministrator_loginandadministrator_login_passwordproperties can be omitted.
- tenantId String
- The tenant id of the Azure AD Administrator of this SQL Server.
ServerIdentity, ServerIdentityArgs    
- Type string
- Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- IdentityIds List<string>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- IdentityIds []string
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- identityIds List<String>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- identityIds string[]
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- identity_ids Sequence[str]
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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. Possible values are SystemAssigned,UserAssigned,SystemAssigned, UserAssigned(to enable both).
- identityIds List<String>
- Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - NOTE: This is required when - typeis set to- UserAssigned- NOTE: When - typeis set to- SystemAssigned, the assigned- principal_idand- tenant_idcan be retrieved after 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.
Import
SQL Servers can be imported using the resource id, e.g.
$ pulumi import azure:mssql/server:Server 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.