1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. ServerTransparentDataEncryption

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages the transparent data encryption configuration for a MSSQL Server

    NOTE: Once transparent data encryption is enabled on a MS SQL instance, it is not possible to remove TDE. You will be able to switch between ‘ServiceManaged’ and ‘CustomerManaged’ keys, but will not be able to remove encryption. For safety when this resource is deleted, the TDE mode will automatically be set to ‘ServiceManaged’. See key_vault_uri for more information on how to specify the key types. As SQL Server only supports a single configuration for encryption settings, this resource will replace the current encryption settings on the server.

    Note: See documentation for important information on how handle lifecycle management of the keys to prevent data lockout.

    Example Usage

    With Service Managed Key

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "EastUs",
            });
            var exampleServer = new Azure.MSSql.Server("exampleServer", new Azure.MSSql.ServerArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.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",
                },
                ExtendedAuditingPolicy = new Azure.MSSql.Inputs.ServerExtendedAuditingPolicyArgs
                {
                    StorageEndpoint = azurerm_storage_account.Example.Primary_blob_endpoint,
                    StorageAccountAccessKey = azurerm_storage_account.Example.Primary_access_key,
                    StorageAccountAccessKeyIsSecondary = true,
                    RetentionInDays = 6,
                },
                Tags = 
                {
                    { "environment", "production" },
                },
            });
            var exampleServerTransparentDataEncryption = new Azure.MSSql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption", new Azure.MSSql.ServerTransparentDataEncryptionArgs
            {
                ServerId = exampleServer.Id,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/mssql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("EastUs"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleServer, err := mssql.NewServer(ctx, "exampleServer", &mssql.ServerArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.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"),
    			},
    			ExtendedAuditingPolicy: &mssql.ServerExtendedAuditingPolicyArgs{
    				StorageEndpoint:                    pulumi.Any(azurerm_storage_account.Example.Primary_blob_endpoint),
    				StorageAccountAccessKey:            pulumi.Any(azurerm_storage_account.Example.Primary_access_key),
    				StorageAccountAccessKeyIsSecondary: pulumi.Bool(true),
    				RetentionInDays:                    pulumi.Int(6),
    			},
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewServerTransparentDataEncryption(ctx, "exampleServerTransparentDataEncryption", &mssql.ServerTransparentDataEncryptionArgs{
    			ServerId: exampleServer.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "EastUs"});
    const exampleServer = new azure.mssql.Server("exampleServer", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        version: "12.0",
        administratorLogin: "missadministrator",
        administratorLoginPassword: "thisIsKat11",
        minimumTlsVersion: "1.2",
        azureadAdministrator: {
            loginUsername: "AzureAD Admin",
            objectId: "00000000-0000-0000-0000-000000000000",
        },
        extendedAuditingPolicy: {
            storageEndpoint: azurerm_storage_account.example.primary_blob_endpoint,
            storageAccountAccessKey: azurerm_storage_account.example.primary_access_key,
            storageAccountAccessKeyIsSecondary: true,
            retentionInDays: 6,
        },
        tags: {
            environment: "production",
        },
    });
    const exampleServerTransparentDataEncryption = new azure.mssql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption", {serverId: exampleServer.id});
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="EastUs")
    example_server = azure.mssql.Server("exampleServer",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        version="12.0",
        administrator_login="missadministrator",
        administrator_login_password="thisIsKat11",
        minimum_tls_version="1.2",
        azuread_administrator=azure.mssql.ServerAzureadAdministratorArgs(
            login_username="AzureAD Admin",
            object_id="00000000-0000-0000-0000-000000000000",
        ),
        extended_auditing_policy=azure.mssql.ServerExtendedAuditingPolicyArgs(
            storage_endpoint=azurerm_storage_account["example"]["primary_blob_endpoint"],
            storage_account_access_key=azurerm_storage_account["example"]["primary_access_key"],
            storage_account_access_key_is_secondary=True,
            retention_in_days=6,
        ),
        tags={
            "environment": "production",
        })
    example_server_transparent_data_encryption = azure.mssql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption", server_id=example_server.id)
    

    Example coming soon!

    With Customer Managed Key

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "EastUs",
            });
            var exampleServer = new Azure.MSSql.Server("exampleServer", new Azure.MSSql.ServerArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.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",
                },
                ExtendedAuditingPolicy = new Azure.MSSql.Inputs.ServerExtendedAuditingPolicyArgs
                {
                    StorageEndpoint = azurerm_storage_account.Example.Primary_blob_endpoint,
                    StorageAccountAccessKey = azurerm_storage_account.Example.Primary_access_key,
                    StorageAccountAccessKeyIsSecondary = true,
                    RetentionInDays = 6,
                },
                Tags = 
                {
                    { "environment", "production" },
                },
                Identity = new Azure.MSSql.Inputs.ServerIdentityArgs
                {
                    Type = "SystemAssigned",
                },
            });
            // Create a key vault with policies for the deployer to create a key & SQL Server to wrap/unwrap/get key
            var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new Azure.KeyVault.KeyVaultArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                EnabledForDiskEncryption = true,
                TenantId = current.Apply(current => current.TenantId),
                SoftDeleteRetentionDays = 7,
                PurgeProtectionEnabled = false,
                SkuName = "standard",
                AccessPolicies = 
                {
                    new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
                    {
                        TenantId = current.Apply(current => current.TenantId),
                        ObjectId = current.Apply(current => current.ObjectId),
                        KeyPermissions = 
                        {
                            "Get",
                            "List",
                            "Create",
                            "Delete",
                            "Update",
                            "Recover",
                            "Purge",
                        },
                    },
                    new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
                    {
                        TenantId = exampleServer.Identity.Apply(identity => identity?.TenantId),
                        ObjectId = exampleServer.Identity.Apply(identity => identity?.PrincipalId),
                        KeyPermissions = 
                        {
                            "Get",
                            "WrapKey",
                            "UnwrapKey",
                        },
                    },
                },
            });
            var exampleKey = new Azure.KeyVault.Key("exampleKey", new Azure.KeyVault.KeyArgs
            {
                KeyVaultId = exampleKeyVault.Id,
                KeyType = "RSA",
                KeySize = 2048,
                KeyOpts = 
                {
                    "unwrapKey",
                    "wrapKey",
                },
            }, new CustomResourceOptions
            {
                DependsOn = 
                {
                    exampleKeyVault,
                },
            });
            var exampleServerTransparentDataEncryption = new Azure.MSSql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption", new Azure.MSSql.ServerTransparentDataEncryptionArgs
            {
                ServerId = exampleServer.Id,
                KeyVaultKeyId = exampleKey.Id,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/keyvault"
    	"github.com/pulumi/pulumi-azure/sdk/v4/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, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("EastUs"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleServer, err := mssql.NewServer(ctx, "exampleServer", &mssql.ServerArgs{
    			ResourceGroupName:          exampleResourceGroup.Name,
    			Location:                   exampleResourceGroup.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"),
    			},
    			ExtendedAuditingPolicy: &mssql.ServerExtendedAuditingPolicyArgs{
    				StorageEndpoint:                    pulumi.Any(azurerm_storage_account.Example.Primary_blob_endpoint),
    				StorageAccountAccessKey:            pulumi.Any(azurerm_storage_account.Example.Primary_access_key),
    				StorageAccountAccessKeyIsSecondary: pulumi.Bool(true),
    				RetentionInDays:                    pulumi.Int(6),
    			},
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("production"),
    			},
    			Identity: &mssql.ServerIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
    			Location:                 exampleResourceGroup.Location,
    			ResourceGroupName:        exampleResourceGroup.Name,
    			EnabledForDiskEncryption: pulumi.Bool(true),
    			TenantId:                 pulumi.String(current.TenantId),
    			SoftDeleteRetentionDays:  pulumi.Int(7),
    			PurgeProtectionEnabled:   pulumi.Bool(false),
    			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"),
    					},
    				},
    				&keyvault.KeyVaultAccessPolicyArgs{
    					TenantId: exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (string, error) {
    						return identity.TenantId, nil
    					}).(pulumi.StringOutput),
    					ObjectId: exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (string, error) {
    						return identity.PrincipalId, nil
    					}).(pulumi.StringOutput),
    					KeyPermissions: pulumi.StringArray{
    						pulumi.String("Get"),
    						pulumi.String("WrapKey"),
    						pulumi.String("UnwrapKey"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleKey, err := keyvault.NewKey(ctx, "exampleKey", &keyvault.KeyArgs{
    			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.NewServerTransparentDataEncryption(ctx, "exampleServerTransparentDataEncryption", &mssql.ServerTransparentDataEncryptionArgs{
    			ServerId:      exampleServer.ID(),
    			KeyVaultKeyId: exampleKey.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const current = azure.core.getClientConfig({});
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "EastUs"});
    const exampleServer = new azure.mssql.Server("exampleServer", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        version: "12.0",
        administratorLogin: "missadministrator",
        administratorLoginPassword: "thisIsKat11",
        minimumTlsVersion: "1.2",
        azureadAdministrator: {
            loginUsername: "AzureAD Admin",
            objectId: "00000000-0000-0000-0000-000000000000",
        },
        extendedAuditingPolicy: {
            storageEndpoint: azurerm_storage_account.example.primary_blob_endpoint,
            storageAccountAccessKey: azurerm_storage_account.example.primary_access_key,
            storageAccountAccessKeyIsSecondary: true,
            retentionInDays: 6,
        },
        tags: {
            environment: "production",
        },
        identity: {
            type: "SystemAssigned",
        },
    });
    // Create a key vault with policies for the deployer to create a key & SQL Server to wrap/unwrap/get key
    const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        enabledForDiskEncryption: true,
        tenantId: current.then(current => current.tenantId),
        softDeleteRetentionDays: 7,
        purgeProtectionEnabled: false,
        skuName: "standard",
        accessPolicies: [
            {
                tenantId: current.then(current => current.tenantId),
                objectId: current.then(current => current.objectId),
                keyPermissions: [
                    "Get",
                    "List",
                    "Create",
                    "Delete",
                    "Update",
                    "Recover",
                    "Purge",
                ],
            },
            {
                tenantId: exampleServer.identity.apply(identity => identity?.tenantId),
                objectId: exampleServer.identity.apply(identity => identity?.principalId),
                keyPermissions: [
                    "Get",
                    "WrapKey",
                    "UnwrapKey",
                ],
            },
        ],
    });
    const exampleKey = new azure.keyvault.Key("exampleKey", {
        keyVaultId: exampleKeyVault.id,
        keyType: "RSA",
        keySize: 2048,
        keyOpts: [
            "unwrapKey",
            "wrapKey",
        ],
    }, {
        dependsOn: [exampleKeyVault],
    });
    const exampleServerTransparentDataEncryption = new azure.mssql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption", {
        serverId: exampleServer.id,
        keyVaultKeyId: exampleKey.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="EastUs")
    example_server = azure.mssql.Server("exampleServer",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        version="12.0",
        administrator_login="missadministrator",
        administrator_login_password="thisIsKat11",
        minimum_tls_version="1.2",
        azuread_administrator=azure.mssql.ServerAzureadAdministratorArgs(
            login_username="AzureAD Admin",
            object_id="00000000-0000-0000-0000-000000000000",
        ),
        extended_auditing_policy=azure.mssql.ServerExtendedAuditingPolicyArgs(
            storage_endpoint=azurerm_storage_account["example"]["primary_blob_endpoint"],
            storage_account_access_key=azurerm_storage_account["example"]["primary_access_key"],
            storage_account_access_key_is_secondary=True,
            retention_in_days=6,
        ),
        tags={
            "environment": "production",
        },
        identity=azure.mssql.ServerIdentityArgs(
            type="SystemAssigned",
        ))
    # Create a key vault with policies for the deployer to create a key & SQL Server to wrap/unwrap/get key
    example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        enabled_for_disk_encryption=True,
        tenant_id=current.tenant_id,
        soft_delete_retention_days=7,
        purge_protection_enabled=False,
        sku_name="standard",
        access_policies=[
            azure.keyvault.KeyVaultAccessPolicyArgs(
                tenant_id=current.tenant_id,
                object_id=current.object_id,
                key_permissions=[
                    "Get",
                    "List",
                    "Create",
                    "Delete",
                    "Update",
                    "Recover",
                    "Purge",
                ],
            ),
            azure.keyvault.KeyVaultAccessPolicyArgs(
                tenant_id=example_server.identity.tenant_id,
                object_id=example_server.identity.principal_id,
                key_permissions=[
                    "Get",
                    "WrapKey",
                    "UnwrapKey",
                ],
            ),
        ])
    example_key = azure.keyvault.Key("exampleKey",
        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_transparent_data_encryption = azure.mssql.ServerTransparentDataEncryption("exampleServerTransparentDataEncryption",
        server_id=example_server.id,
        key_vault_key_id=example_key.id)
    

    Example coming soon!

    Create ServerTransparentDataEncryption Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServerTransparentDataEncryption(name: string, args: ServerTransparentDataEncryptionArgs, opts?: CustomResourceOptions);
    @overload
    def ServerTransparentDataEncryption(resource_name: str,
                                        args: ServerTransparentDataEncryptionArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServerTransparentDataEncryption(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        server_id: Optional[str] = None,
                                        key_vault_key_id: Optional[str] = None)
    func NewServerTransparentDataEncryption(ctx *Context, name string, args ServerTransparentDataEncryptionArgs, opts ...ResourceOption) (*ServerTransparentDataEncryption, error)
    public ServerTransparentDataEncryption(string name, ServerTransparentDataEncryptionArgs args, CustomResourceOptions? opts = null)
    public ServerTransparentDataEncryption(String name, ServerTransparentDataEncryptionArgs args)
    public ServerTransparentDataEncryption(String name, ServerTransparentDataEncryptionArgs args, CustomResourceOptions options)
    
    type: azure:mssql:ServerTransparentDataEncryption
    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 ServerTransparentDataEncryptionArgs
    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 ServerTransparentDataEncryptionArgs
    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 ServerTransparentDataEncryptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerTransparentDataEncryptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerTransparentDataEncryptionArgs
    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 serverTransparentDataEncryptionResource = new Azure.MSSql.ServerTransparentDataEncryption("serverTransparentDataEncryptionResource", new()
    {
        ServerId = "string",
        KeyVaultKeyId = "string",
    });
    
    example, err := mssql.NewServerTransparentDataEncryption(ctx, "serverTransparentDataEncryptionResource", &mssql.ServerTransparentDataEncryptionArgs{
    	ServerId:      pulumi.String("string"),
    	KeyVaultKeyId: pulumi.String("string"),
    })
    
    var serverTransparentDataEncryptionResource = new ServerTransparentDataEncryption("serverTransparentDataEncryptionResource", ServerTransparentDataEncryptionArgs.builder()
        .serverId("string")
        .keyVaultKeyId("string")
        .build());
    
    server_transparent_data_encryption_resource = azure.mssql.ServerTransparentDataEncryption("serverTransparentDataEncryptionResource",
        server_id="string",
        key_vault_key_id="string")
    
    const serverTransparentDataEncryptionResource = new azure.mssql.ServerTransparentDataEncryption("serverTransparentDataEncryptionResource", {
        serverId: "string",
        keyVaultKeyId: "string",
    });
    
    type: azure:mssql:ServerTransparentDataEncryption
    properties:
        keyVaultKeyId: string
        serverId: string
    

    ServerTransparentDataEncryption 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 ServerTransparentDataEncryption resource accepts the following input properties:

    ServerId string
    Specifies the name of the MS SQL Server.
    KeyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    ServerId string
    Specifies the name of the MS SQL Server.
    KeyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId String
    Specifies the name of the MS SQL Server.
    keyVaultKeyId String
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId string
    Specifies the name of the MS SQL Server.
    keyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    server_id str
    Specifies the name of the MS SQL Server.
    key_vault_key_id str
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId String
    Specifies the name of the MS SQL Server.
    keyVaultKeyId String
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServerTransparentDataEncryption resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServerTransparentDataEncryption Resource

    Get an existing ServerTransparentDataEncryption 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?: ServerTransparentDataEncryptionState, opts?: CustomResourceOptions): ServerTransparentDataEncryption
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            key_vault_key_id: Optional[str] = None,
            server_id: Optional[str] = None) -> ServerTransparentDataEncryption
    func GetServerTransparentDataEncryption(ctx *Context, name string, id IDInput, state *ServerTransparentDataEncryptionState, opts ...ResourceOption) (*ServerTransparentDataEncryption, error)
    public static ServerTransparentDataEncryption Get(string name, Input<string> id, ServerTransparentDataEncryptionState? state, CustomResourceOptions? opts = null)
    public static ServerTransparentDataEncryption get(String name, Output<String> id, ServerTransparentDataEncryptionState state, CustomResourceOptions options)
    resources:  _:    type: azure:mssql:ServerTransparentDataEncryption    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.
    The following state arguments are supported:
    KeyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    ServerId string
    Specifies the name of the MS SQL Server.
    KeyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    ServerId string
    Specifies the name of the MS SQL Server.
    keyVaultKeyId String
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId String
    Specifies the name of the MS SQL Server.
    keyVaultKeyId string
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId string
    Specifies the name of the MS SQL Server.
    key_vault_key_id str
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    server_id str
    Specifies the name of the MS SQL Server.
    keyVaultKeyId String
    To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
    serverId String
    Specifies the name of the MS SQL Server.

    Import

    SQL Server Transparent Data Encryption can be imported using the resource id, e.g.

     $ pulumi import azure:mssql/serverTransparentDataEncryption:ServerTransparentDataEncryption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/encryptionProtector/current
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.