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

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 a Microsoft SQL Virtual Machine

    Example Usage

    This example provisions a brief Managed MsSql Virtual Machine.

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleVirtualMachine = Output.Create(Azure.Compute.GetVirtualMachine.InvokeAsync(new Azure.Compute.GetVirtualMachineArgs
            {
                Name = "example-vm",
                ResourceGroupName = "example-resources",
            }));
            var exampleMssql_virtualMachineVirtualMachine = new Azure.MSSql.VirtualMachine("exampleMssql/virtualMachineVirtualMachine", new Azure.MSSql.VirtualMachineArgs
            {
                VirtualMachineId = exampleVirtualMachine.Apply(exampleVirtualMachine => exampleVirtualMachine.Id),
                SqlLicenseType = "PAYG",
                RServicesEnabled = true,
                SqlConnectivityPort = 1433,
                SqlConnectivityType = "PRIVATE",
                SqlConnectivityUpdatePassword = "Password1234!",
                SqlConnectivityUpdateUsername = "sqllogin",
                AutoPatching = new Azure.MSSql.Inputs.VirtualMachineAutoPatchingArgs
                {
                    DayOfWeek = "Sunday",
                    MaintenanceWindowDurationInMinutes = 60,
                    MaintenanceWindowStartingHour = 2,
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
    	"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 {
    		exampleVirtualMachine, err := compute.LookupVirtualMachine(ctx, &compute.LookupVirtualMachineArgs{
    			Name:              "example-vm",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = mssql.NewVirtualMachine(ctx, "exampleMssql/virtualMachineVirtualMachine", &mssql.VirtualMachineArgs{
    			VirtualMachineId:              pulumi.String(exampleVirtualMachine.Id),
    			SqlLicenseType:                pulumi.String("PAYG"),
    			RServicesEnabled:              pulumi.Bool(true),
    			SqlConnectivityPort:           pulumi.Int(1433),
    			SqlConnectivityType:           pulumi.String("PRIVATE"),
    			SqlConnectivityUpdatePassword: pulumi.String("Password1234!"),
    			SqlConnectivityUpdateUsername: pulumi.String("sqllogin"),
    			AutoPatching: &mssql.VirtualMachineAutoPatchingArgs{
    				DayOfWeek:                          pulumi.String("Sunday"),
    				MaintenanceWindowDurationInMinutes: pulumi.Int(60),
    				MaintenanceWindowStartingHour:      pulumi.Int(2),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleVirtualMachine = azure.compute.getVirtualMachine({
        name: "example-vm",
        resourceGroupName: "example-resources",
    });
    const exampleMssql_virtualMachineVirtualMachine = new azure.mssql.VirtualMachine("exampleMssql/virtualMachineVirtualMachine", {
        virtualMachineId: exampleVirtualMachine.then(exampleVirtualMachine => exampleVirtualMachine.id),
        sqlLicenseType: "PAYG",
        rServicesEnabled: true,
        sqlConnectivityPort: 1433,
        sqlConnectivityType: "PRIVATE",
        sqlConnectivityUpdatePassword: "Password1234!",
        sqlConnectivityUpdateUsername: "sqllogin",
        autoPatching: {
            dayOfWeek: "Sunday",
            maintenanceWindowDurationInMinutes: 60,
            maintenanceWindowStartingHour: 2,
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_virtual_machine = azure.compute.get_virtual_machine(name="example-vm",
        resource_group_name="example-resources")
    example_mssql_virtual_machine_virtual_machine = azure.mssql.VirtualMachine("exampleMssql/virtualMachineVirtualMachine",
        virtual_machine_id=example_virtual_machine.id,
        sql_license_type="PAYG",
        r_services_enabled=True,
        sql_connectivity_port=1433,
        sql_connectivity_type="PRIVATE",
        sql_connectivity_update_password="Password1234!",
        sql_connectivity_update_username="sqllogin",
        auto_patching=azure.mssql.VirtualMachineAutoPatchingArgs(
            day_of_week="Sunday",
            maintenance_window_duration_in_minutes=60,
            maintenance_window_starting_hour=2,
        ))
    

    Example coming soon!

    Create VirtualMachine Resource

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

    Constructor syntax

    new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualMachine(resource_name: str,
                       args: VirtualMachineArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualMachine(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       sql_license_type: Optional[str] = None,
                       virtual_machine_id: Optional[str] = None,
                       auto_backup: Optional[VirtualMachineAutoBackupArgs] = None,
                       auto_patching: Optional[VirtualMachineAutoPatchingArgs] = None,
                       key_vault_credential: Optional[VirtualMachineKeyVaultCredentialArgs] = None,
                       r_services_enabled: Optional[bool] = None,
                       sql_connectivity_port: Optional[int] = None,
                       sql_connectivity_type: Optional[str] = None,
                       sql_connectivity_update_password: Optional[str] = None,
                       sql_connectivity_update_username: Optional[str] = None,
                       storage_configuration: Optional[VirtualMachineStorageConfigurationArgs] = None,
                       tags: Optional[Mapping[str, str]] = None)
    func NewVirtualMachine(ctx *Context, name string, args VirtualMachineArgs, opts ...ResourceOption) (*VirtualMachine, error)
    public VirtualMachine(string name, VirtualMachineArgs args, CustomResourceOptions? opts = null)
    public VirtualMachine(String name, VirtualMachineArgs args)
    public VirtualMachine(String name, VirtualMachineArgs args, CustomResourceOptions options)
    
    type: azure:mssql:VirtualMachine
    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 VirtualMachineArgs
    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 VirtualMachineArgs
    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 VirtualMachineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualMachineArgs
    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 azureVirtualMachineResource = new Azure.MSSql.VirtualMachine("azureVirtualMachineResource", new()
    {
        SqlLicenseType = "string",
        VirtualMachineId = "string",
        AutoBackup = new Azure.MSSql.Inputs.VirtualMachineAutoBackupArgs
        {
            RetentionPeriodInDays = 0,
            StorageAccountAccessKey = "string",
            StorageBlobEndpoint = "string",
            EncryptionEnabled = false,
            EncryptionPassword = "string",
            ManualSchedule = new Azure.MSSql.Inputs.VirtualMachineAutoBackupManualScheduleArgs
            {
                FullBackupFrequency = "string",
                FullBackupStartHour = 0,
                FullBackupWindowInHours = 0,
                LogBackupFrequencyInMinutes = 0,
            },
            SystemDatabasesBackupEnabled = false,
        },
        AutoPatching = new Azure.MSSql.Inputs.VirtualMachineAutoPatchingArgs
        {
            DayOfWeek = "string",
            MaintenanceWindowDurationInMinutes = 0,
            MaintenanceWindowStartingHour = 0,
        },
        KeyVaultCredential = new Azure.MSSql.Inputs.VirtualMachineKeyVaultCredentialArgs
        {
            KeyVaultUrl = "string",
            Name = "string",
            ServicePrincipalName = "string",
            ServicePrincipalSecret = "string",
        },
        RServicesEnabled = false,
        SqlConnectivityPort = 0,
        SqlConnectivityType = "string",
        SqlConnectivityUpdatePassword = "string",
        SqlConnectivityUpdateUsername = "string",
        StorageConfiguration = new Azure.MSSql.Inputs.VirtualMachineStorageConfigurationArgs
        {
            DiskType = "string",
            StorageWorkloadType = "string",
            DataSettings = new Azure.MSSql.Inputs.VirtualMachineStorageConfigurationDataSettingsArgs
            {
                DefaultFilePath = "string",
                Luns = new[]
                {
                    0,
                },
            },
            LogSettings = new Azure.MSSql.Inputs.VirtualMachineStorageConfigurationLogSettingsArgs
            {
                DefaultFilePath = "string",
                Luns = new[]
                {
                    0,
                },
            },
            TempDbSettings = new Azure.MSSql.Inputs.VirtualMachineStorageConfigurationTempDbSettingsArgs
            {
                DefaultFilePath = "string",
                Luns = new[]
                {
                    0,
                },
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := mssql.NewVirtualMachine(ctx, "azureVirtualMachineResource", &mssql.VirtualMachineArgs{
    	SqlLicenseType:   pulumi.String("string"),
    	VirtualMachineId: pulumi.String("string"),
    	AutoBackup: &mssql.VirtualMachineAutoBackupArgs{
    		RetentionPeriodInDays:   pulumi.Int(0),
    		StorageAccountAccessKey: pulumi.String("string"),
    		StorageBlobEndpoint:     pulumi.String("string"),
    		EncryptionEnabled:       pulumi.Bool(false),
    		EncryptionPassword:      pulumi.String("string"),
    		ManualSchedule: &mssql.VirtualMachineAutoBackupManualScheduleArgs{
    			FullBackupFrequency:         pulumi.String("string"),
    			FullBackupStartHour:         pulumi.Int(0),
    			FullBackupWindowInHours:     pulumi.Int(0),
    			LogBackupFrequencyInMinutes: pulumi.Int(0),
    		},
    		SystemDatabasesBackupEnabled: pulumi.Bool(false),
    	},
    	AutoPatching: &mssql.VirtualMachineAutoPatchingArgs{
    		DayOfWeek:                          pulumi.String("string"),
    		MaintenanceWindowDurationInMinutes: pulumi.Int(0),
    		MaintenanceWindowStartingHour:      pulumi.Int(0),
    	},
    	KeyVaultCredential: &mssql.VirtualMachineKeyVaultCredentialArgs{
    		KeyVaultUrl:            pulumi.String("string"),
    		Name:                   pulumi.String("string"),
    		ServicePrincipalName:   pulumi.String("string"),
    		ServicePrincipalSecret: pulumi.String("string"),
    	},
    	RServicesEnabled:              pulumi.Bool(false),
    	SqlConnectivityPort:           pulumi.Int(0),
    	SqlConnectivityType:           pulumi.String("string"),
    	SqlConnectivityUpdatePassword: pulumi.String("string"),
    	SqlConnectivityUpdateUsername: pulumi.String("string"),
    	StorageConfiguration: &mssql.VirtualMachineStorageConfigurationArgs{
    		DiskType:            pulumi.String("string"),
    		StorageWorkloadType: pulumi.String("string"),
    		DataSettings: &mssql.VirtualMachineStorageConfigurationDataSettingsArgs{
    			DefaultFilePath: pulumi.String("string"),
    			Luns: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    		},
    		LogSettings: &mssql.VirtualMachineStorageConfigurationLogSettingsArgs{
    			DefaultFilePath: pulumi.String("string"),
    			Luns: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    		},
    		TempDbSettings: &mssql.VirtualMachineStorageConfigurationTempDbSettingsArgs{
    			DefaultFilePath: pulumi.String("string"),
    			Luns: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var azureVirtualMachineResource = new com.pulumi.azure.mssql.VirtualMachine("azureVirtualMachineResource", com.pulumi.azure.mssql.VirtualMachineArgs.builder()
        .sqlLicenseType("string")
        .virtualMachineId("string")
        .autoBackup(VirtualMachineAutoBackupArgs.builder()
            .retentionPeriodInDays(0)
            .storageAccountAccessKey("string")
            .storageBlobEndpoint("string")
            .encryptionEnabled(false)
            .encryptionPassword("string")
            .manualSchedule(VirtualMachineAutoBackupManualScheduleArgs.builder()
                .fullBackupFrequency("string")
                .fullBackupStartHour(0)
                .fullBackupWindowInHours(0)
                .logBackupFrequencyInMinutes(0)
                .build())
            .systemDatabasesBackupEnabled(false)
            .build())
        .autoPatching(VirtualMachineAutoPatchingArgs.builder()
            .dayOfWeek("string")
            .maintenanceWindowDurationInMinutes(0)
            .maintenanceWindowStartingHour(0)
            .build())
        .keyVaultCredential(VirtualMachineKeyVaultCredentialArgs.builder()
            .keyVaultUrl("string")
            .name("string")
            .servicePrincipalName("string")
            .servicePrincipalSecret("string")
            .build())
        .rServicesEnabled(false)
        .sqlConnectivityPort(0)
        .sqlConnectivityType("string")
        .sqlConnectivityUpdatePassword("string")
        .sqlConnectivityUpdateUsername("string")
        .storageConfiguration(VirtualMachineStorageConfigurationArgs.builder()
            .diskType("string")
            .storageWorkloadType("string")
            .dataSettings(VirtualMachineStorageConfigurationDataSettingsArgs.builder()
                .defaultFilePath("string")
                .luns(0)
                .build())
            .logSettings(VirtualMachineStorageConfigurationLogSettingsArgs.builder()
                .defaultFilePath("string")
                .luns(0)
                .build())
            .tempDbSettings(VirtualMachineStorageConfigurationTempDbSettingsArgs.builder()
                .defaultFilePath("string")
                .luns(0)
                .build())
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    azure_virtual_machine_resource = azure.mssql.VirtualMachine("azureVirtualMachineResource",
        sql_license_type="string",
        virtual_machine_id="string",
        auto_backup={
            "retention_period_in_days": 0,
            "storage_account_access_key": "string",
            "storage_blob_endpoint": "string",
            "encryption_enabled": False,
            "encryption_password": "string",
            "manual_schedule": {
                "full_backup_frequency": "string",
                "full_backup_start_hour": 0,
                "full_backup_window_in_hours": 0,
                "log_backup_frequency_in_minutes": 0,
            },
            "system_databases_backup_enabled": False,
        },
        auto_patching={
            "day_of_week": "string",
            "maintenance_window_duration_in_minutes": 0,
            "maintenance_window_starting_hour": 0,
        },
        key_vault_credential={
            "key_vault_url": "string",
            "name": "string",
            "service_principal_name": "string",
            "service_principal_secret": "string",
        },
        r_services_enabled=False,
        sql_connectivity_port=0,
        sql_connectivity_type="string",
        sql_connectivity_update_password="string",
        sql_connectivity_update_username="string",
        storage_configuration={
            "disk_type": "string",
            "storage_workload_type": "string",
            "data_settings": {
                "default_file_path": "string",
                "luns": [0],
            },
            "log_settings": {
                "default_file_path": "string",
                "luns": [0],
            },
            "temp_db_settings": {
                "default_file_path": "string",
                "luns": [0],
            },
        },
        tags={
            "string": "string",
        })
    
    const azureVirtualMachineResource = new azure.mssql.VirtualMachine("azureVirtualMachineResource", {
        sqlLicenseType: "string",
        virtualMachineId: "string",
        autoBackup: {
            retentionPeriodInDays: 0,
            storageAccountAccessKey: "string",
            storageBlobEndpoint: "string",
            encryptionEnabled: false,
            encryptionPassword: "string",
            manualSchedule: {
                fullBackupFrequency: "string",
                fullBackupStartHour: 0,
                fullBackupWindowInHours: 0,
                logBackupFrequencyInMinutes: 0,
            },
            systemDatabasesBackupEnabled: false,
        },
        autoPatching: {
            dayOfWeek: "string",
            maintenanceWindowDurationInMinutes: 0,
            maintenanceWindowStartingHour: 0,
        },
        keyVaultCredential: {
            keyVaultUrl: "string",
            name: "string",
            servicePrincipalName: "string",
            servicePrincipalSecret: "string",
        },
        rServicesEnabled: false,
        sqlConnectivityPort: 0,
        sqlConnectivityType: "string",
        sqlConnectivityUpdatePassword: "string",
        sqlConnectivityUpdateUsername: "string",
        storageConfiguration: {
            diskType: "string",
            storageWorkloadType: "string",
            dataSettings: {
                defaultFilePath: "string",
                luns: [0],
            },
            logSettings: {
                defaultFilePath: "string",
                luns: [0],
            },
            tempDbSettings: {
                defaultFilePath: "string",
                luns: [0],
            },
        },
        tags: {
            string: "string",
        },
    });
    
    type: azure:mssql:VirtualMachine
    properties:
        autoBackup:
            encryptionEnabled: false
            encryptionPassword: string
            manualSchedule:
                fullBackupFrequency: string
                fullBackupStartHour: 0
                fullBackupWindowInHours: 0
                logBackupFrequencyInMinutes: 0
            retentionPeriodInDays: 0
            storageAccountAccessKey: string
            storageBlobEndpoint: string
            systemDatabasesBackupEnabled: false
        autoPatching:
            dayOfWeek: string
            maintenanceWindowDurationInMinutes: 0
            maintenanceWindowStartingHour: 0
        keyVaultCredential:
            keyVaultUrl: string
            name: string
            servicePrincipalName: string
            servicePrincipalSecret: string
        rServicesEnabled: false
        sqlConnectivityPort: 0
        sqlConnectivityType: string
        sqlConnectivityUpdatePassword: string
        sqlConnectivityUpdateUsername: string
        sqlLicenseType: string
        storageConfiguration:
            dataSettings:
                defaultFilePath: string
                luns:
                    - 0
            diskType: string
            logSettings:
                defaultFilePath: string
                luns:
                    - 0
            storageWorkloadType: string
            tempDbSettings:
                defaultFilePath: string
                luns:
                    - 0
        tags:
            string: string
        virtualMachineId: string
    

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

    SqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    AutoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    AutoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    KeyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    RServicesEnabled bool
    Should R Services be enabled?
    SqlConnectivityPort int
    The SQL Server port. Defaults to 1433.
    SqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    SqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    SqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    StorageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    SqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    AutoBackup VirtualMachineAutoBackupArgs
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    AutoPatching VirtualMachineAutoPatchingArgs
    An auto_patching block as defined below.
    KeyVaultCredential VirtualMachineKeyVaultCredentialArgs
    (Optional) An key_vault_credential block as defined below.
    RServicesEnabled bool
    Should R Services be enabled?
    SqlConnectivityPort int
    The SQL Server port. Defaults to 1433.
    SqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    SqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    SqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    StorageConfiguration VirtualMachineStorageConfigurationArgs
    An storage_configuration block as defined below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    sqlLicenseType String
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    keyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled Boolean
    Should R Services be enabled?
    sqlConnectivityPort Integer
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType String
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword String
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername String
    The SQL Server sysadmin login to create.
    storageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    sqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    virtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    keyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled boolean
    Should R Services be enabled?
    sqlConnectivityPort number
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    storageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    sql_license_type str
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    virtual_machine_id str
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    auto_backup VirtualMachineAutoBackupArgs
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    auto_patching VirtualMachineAutoPatchingArgs
    An auto_patching block as defined below.
    key_vault_credential VirtualMachineKeyVaultCredentialArgs
    (Optional) An key_vault_credential block as defined below.
    r_services_enabled bool
    Should R Services be enabled?
    sql_connectivity_port int
    The SQL Server port. Defaults to 1433.
    sql_connectivity_type str
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sql_connectivity_update_password str
    The SQL Server sysadmin login password.
    sql_connectivity_update_username str
    The SQL Server sysadmin login to create.
    storage_configuration VirtualMachineStorageConfigurationArgs
    An storage_configuration block as defined below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    sqlLicenseType String
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup Property Map
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching Property Map
    An auto_patching block as defined below.
    keyVaultCredential Property Map
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled Boolean
    Should R Services be enabled?
    sqlConnectivityPort Number
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType String
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword String
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername String
    The SQL Server sysadmin login to create.
    storageConfiguration Property Map
    An storage_configuration block as defined below.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualMachine 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 VirtualMachine Resource

    Get an existing VirtualMachine 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?: VirtualMachineState, opts?: CustomResourceOptions): VirtualMachine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_backup: Optional[VirtualMachineAutoBackupArgs] = None,
            auto_patching: Optional[VirtualMachineAutoPatchingArgs] = None,
            key_vault_credential: Optional[VirtualMachineKeyVaultCredentialArgs] = None,
            r_services_enabled: Optional[bool] = None,
            sql_connectivity_port: Optional[int] = None,
            sql_connectivity_type: Optional[str] = None,
            sql_connectivity_update_password: Optional[str] = None,
            sql_connectivity_update_username: Optional[str] = None,
            sql_license_type: Optional[str] = None,
            storage_configuration: Optional[VirtualMachineStorageConfigurationArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            virtual_machine_id: Optional[str] = None) -> VirtualMachine
    func GetVirtualMachine(ctx *Context, name string, id IDInput, state *VirtualMachineState, opts ...ResourceOption) (*VirtualMachine, error)
    public static VirtualMachine Get(string name, Input<string> id, VirtualMachineState? state, CustomResourceOptions? opts = null)
    public static VirtualMachine get(String name, Output<String> id, VirtualMachineState state, CustomResourceOptions options)
    resources:  _:    type: azure:mssql:VirtualMachine    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:
    AutoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    AutoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    KeyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    RServicesEnabled bool
    Should R Services be enabled?
    SqlConnectivityPort int
    The SQL Server port. Defaults to 1433.
    SqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    SqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    SqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    SqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    StorageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    AutoBackup VirtualMachineAutoBackupArgs
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    AutoPatching VirtualMachineAutoPatchingArgs
    An auto_patching block as defined below.
    KeyVaultCredential VirtualMachineKeyVaultCredentialArgs
    (Optional) An key_vault_credential block as defined below.
    RServicesEnabled bool
    Should R Services be enabled?
    SqlConnectivityPort int
    The SQL Server port. Defaults to 1433.
    SqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    SqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    SqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    SqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    StorageConfiguration VirtualMachineStorageConfigurationArgs
    An storage_configuration block as defined below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    VirtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    keyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled Boolean
    Should R Services be enabled?
    sqlConnectivityPort Integer
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType String
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword String
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername String
    The SQL Server sysadmin login to create.
    sqlLicenseType String
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    storageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup VirtualMachineAutoBackup
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching VirtualMachineAutoPatching
    An auto_patching block as defined below.
    keyVaultCredential VirtualMachineKeyVaultCredential
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled boolean
    Should R Services be enabled?
    sqlConnectivityPort number
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType string
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword string
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername string
    The SQL Server sysadmin login to create.
    sqlLicenseType string
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    storageConfiguration VirtualMachineStorageConfiguration
    An storage_configuration block as defined below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    virtualMachineId string
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    auto_backup VirtualMachineAutoBackupArgs
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    auto_patching VirtualMachineAutoPatchingArgs
    An auto_patching block as defined below.
    key_vault_credential VirtualMachineKeyVaultCredentialArgs
    (Optional) An key_vault_credential block as defined below.
    r_services_enabled bool
    Should R Services be enabled?
    sql_connectivity_port int
    The SQL Server port. Defaults to 1433.
    sql_connectivity_type str
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sql_connectivity_update_password str
    The SQL Server sysadmin login password.
    sql_connectivity_update_username str
    The SQL Server sysadmin login to create.
    sql_license_type str
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    storage_configuration VirtualMachineStorageConfigurationArgs
    An storage_configuration block as defined below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    virtual_machine_id str
    The ID of the Virtual Machine. Changing this forces a new resource to be created.
    autoBackup Property Map
    An auto_backup block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
    autoPatching Property Map
    An auto_patching block as defined below.
    keyVaultCredential Property Map
    (Optional) An key_vault_credential block as defined below.
    rServicesEnabled Boolean
    Should R Services be enabled?
    sqlConnectivityPort Number
    The SQL Server port. Defaults to 1433.
    sqlConnectivityType String
    The connectivity type used for this SQL Server. Defaults to PRIVATE.
    sqlConnectivityUpdatePassword String
    The SQL Server sysadmin login password.
    sqlConnectivityUpdateUsername String
    The SQL Server sysadmin login to create.
    sqlLicenseType String
    The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit), DR (Disaster Recovery), and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
    storageConfiguration Property Map
    An storage_configuration block as defined below.
    tags Map<String>
    A mapping of tags to assign to the resource.
    virtualMachineId String
    The ID of the Virtual Machine. Changing this forces a new resource to be created.

    Supporting Types

    VirtualMachineAutoBackup, VirtualMachineAutoBackupArgs

    RetentionPeriodInDays int
    Retention period of backups, in days. Valid values are from 1 to 30.
    StorageAccountAccessKey string
    Access key for the storage account where backups will be kept.
    StorageBlobEndpoint string
    Blob endpoint for the storage account where backups will be kept.
    EncryptionEnabled bool
    Enable or disable encryption for backups. Defaults to false.
    EncryptionPassword string
    Encryption password to use. Must be specified when encryption is enabled.
    ManualSchedule VirtualMachineAutoBackupManualSchedule
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    SystemDatabasesBackupEnabled bool
    Include or exclude system databases from auto backup. Defaults to false.
    RetentionPeriodInDays int
    Retention period of backups, in days. Valid values are from 1 to 30.
    StorageAccountAccessKey string
    Access key for the storage account where backups will be kept.
    StorageBlobEndpoint string
    Blob endpoint for the storage account where backups will be kept.
    EncryptionEnabled bool
    Enable or disable encryption for backups. Defaults to false.
    EncryptionPassword string
    Encryption password to use. Must be specified when encryption is enabled.
    ManualSchedule VirtualMachineAutoBackupManualSchedule
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    SystemDatabasesBackupEnabled bool
    Include or exclude system databases from auto backup. Defaults to false.
    retentionPeriodInDays Integer
    Retention period of backups, in days. Valid values are from 1 to 30.
    storageAccountAccessKey String
    Access key for the storage account where backups will be kept.
    storageBlobEndpoint String
    Blob endpoint for the storage account where backups will be kept.
    encryptionEnabled Boolean
    Enable or disable encryption for backups. Defaults to false.
    encryptionPassword String
    Encryption password to use. Must be specified when encryption is enabled.
    manualSchedule VirtualMachineAutoBackupManualSchedule
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    systemDatabasesBackupEnabled Boolean
    Include or exclude system databases from auto backup. Defaults to false.
    retentionPeriodInDays number
    Retention period of backups, in days. Valid values are from 1 to 30.
    storageAccountAccessKey string
    Access key for the storage account where backups will be kept.
    storageBlobEndpoint string
    Blob endpoint for the storage account where backups will be kept.
    encryptionEnabled boolean
    Enable or disable encryption for backups. Defaults to false.
    encryptionPassword string
    Encryption password to use. Must be specified when encryption is enabled.
    manualSchedule VirtualMachineAutoBackupManualSchedule
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    systemDatabasesBackupEnabled boolean
    Include or exclude system databases from auto backup. Defaults to false.
    retention_period_in_days int
    Retention period of backups, in days. Valid values are from 1 to 30.
    storage_account_access_key str
    Access key for the storage account where backups will be kept.
    storage_blob_endpoint str
    Blob endpoint for the storage account where backups will be kept.
    encryption_enabled bool
    Enable or disable encryption for backups. Defaults to false.
    encryption_password str
    Encryption password to use. Must be specified when encryption is enabled.
    manual_schedule VirtualMachineAutoBackupManualSchedule
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    system_databases_backup_enabled bool
    Include or exclude system databases from auto backup. Defaults to false.
    retentionPeriodInDays Number
    Retention period of backups, in days. Valid values are from 1 to 30.
    storageAccountAccessKey String
    Access key for the storage account where backups will be kept.
    storageBlobEndpoint String
    Blob endpoint for the storage account where backups will be kept.
    encryptionEnabled Boolean
    Enable or disable encryption for backups. Defaults to false.
    encryptionPassword String
    Encryption password to use. Must be specified when encryption is enabled.
    manualSchedule Property Map
    A manual_schedule block as documented below. When this block is present, the schedule type is set to Manual. Without this block, the schedule type is set to Automated.
    systemDatabasesBackupEnabled Boolean
    Include or exclude system databases from auto backup. Defaults to false.

    VirtualMachineAutoBackupManualSchedule, VirtualMachineAutoBackupManualScheduleArgs

    FullBackupFrequency string
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    FullBackupStartHour int
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    FullBackupWindowInHours int
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    LogBackupFrequencyInMinutes int
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.
    FullBackupFrequency string
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    FullBackupStartHour int
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    FullBackupWindowInHours int
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    LogBackupFrequencyInMinutes int
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.
    fullBackupFrequency String
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    fullBackupStartHour Integer
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    fullBackupWindowInHours Integer
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    logBackupFrequencyInMinutes Integer
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.
    fullBackupFrequency string
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    fullBackupStartHour number
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    fullBackupWindowInHours number
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    logBackupFrequencyInMinutes number
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.
    full_backup_frequency str
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    full_backup_start_hour int
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    full_backup_window_in_hours int
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    log_backup_frequency_in_minutes int
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.
    fullBackupFrequency String
    Frequency of full backups. Valid values include Daily or Weekly. Required when backup_schedule_automated is false.
    fullBackupStartHour Number
    Start hour of a given day during which full backups can take place. Valid values are from 0 to 23. Required when backup_schedule_automated is false.
    fullBackupWindowInHours Number
    Duration of the time window of a given day during which full backups can take place, in hours. Valid values are between 1 and 23. Required when backup_schedule_automated is false.
    logBackupFrequencyInMinutes Number
    Frequency of log backups, in minutes. Valid values are from 5 to 60. Required when backup_schedule_automated is false.

    VirtualMachineAutoPatching, VirtualMachineAutoPatchingArgs

    DayOfWeek string
    The day of week to apply the patch on.
    MaintenanceWindowDurationInMinutes int
    The size of the Maintenance Window in minutes.
    MaintenanceWindowStartingHour int
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.
    DayOfWeek string
    The day of week to apply the patch on.
    MaintenanceWindowDurationInMinutes int
    The size of the Maintenance Window in minutes.
    MaintenanceWindowStartingHour int
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.
    dayOfWeek String
    The day of week to apply the patch on.
    maintenanceWindowDurationInMinutes Integer
    The size of the Maintenance Window in minutes.
    maintenanceWindowStartingHour Integer
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.
    dayOfWeek string
    The day of week to apply the patch on.
    maintenanceWindowDurationInMinutes number
    The size of the Maintenance Window in minutes.
    maintenanceWindowStartingHour number
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.
    day_of_week str
    The day of week to apply the patch on.
    maintenance_window_duration_in_minutes int
    The size of the Maintenance Window in minutes.
    maintenance_window_starting_hour int
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.
    dayOfWeek String
    The day of week to apply the patch on.
    maintenanceWindowDurationInMinutes Number
    The size of the Maintenance Window in minutes.
    maintenanceWindowStartingHour Number
    The Hour, in the Virtual Machine Time-Zone when the patching maintenance window should begin.

    VirtualMachineKeyVaultCredential, VirtualMachineKeyVaultCredentialArgs

    KeyVaultUrl string
    The azure Key Vault url. Changing this forces a new resource to be created.
    Name string
    The credential name.
    ServicePrincipalName string
    The service principal name to access key vault. Changing this forces a new resource to be created.
    ServicePrincipalSecret string
    The service principal name secret to access key vault. Changing this forces a new resource to be created.
    KeyVaultUrl string
    The azure Key Vault url. Changing this forces a new resource to be created.
    Name string
    The credential name.
    ServicePrincipalName string
    The service principal name to access key vault. Changing this forces a new resource to be created.
    ServicePrincipalSecret string
    The service principal name secret to access key vault. Changing this forces a new resource to be created.
    keyVaultUrl String
    The azure Key Vault url. Changing this forces a new resource to be created.
    name String
    The credential name.
    servicePrincipalName String
    The service principal name to access key vault. Changing this forces a new resource to be created.
    servicePrincipalSecret String
    The service principal name secret to access key vault. Changing this forces a new resource to be created.
    keyVaultUrl string
    The azure Key Vault url. Changing this forces a new resource to be created.
    name string
    The credential name.
    servicePrincipalName string
    The service principal name to access key vault. Changing this forces a new resource to be created.
    servicePrincipalSecret string
    The service principal name secret to access key vault. Changing this forces a new resource to be created.
    key_vault_url str
    The azure Key Vault url. Changing this forces a new resource to be created.
    name str
    The credential name.
    service_principal_name str
    The service principal name to access key vault. Changing this forces a new resource to be created.
    service_principal_secret str
    The service principal name secret to access key vault. Changing this forces a new resource to be created.
    keyVaultUrl String
    The azure Key Vault url. Changing this forces a new resource to be created.
    name String
    The credential name.
    servicePrincipalName String
    The service principal name to access key vault. Changing this forces a new resource to be created.
    servicePrincipalSecret String
    The service principal name secret to access key vault. Changing this forces a new resource to be created.

    VirtualMachineStorageConfiguration, VirtualMachineStorageConfigurationArgs

    DiskType string
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    StorageWorkloadType string
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    DataSettings VirtualMachineStorageConfigurationDataSettings
    An storage_settings as defined below.
    LogSettings VirtualMachineStorageConfigurationLogSettings
    An storage_settings as defined below.
    TempDbSettings VirtualMachineStorageConfigurationTempDbSettings
    An storage_settings as defined below.
    DiskType string
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    StorageWorkloadType string
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    DataSettings VirtualMachineStorageConfigurationDataSettings
    An storage_settings as defined below.
    LogSettings VirtualMachineStorageConfigurationLogSettings
    An storage_settings as defined below.
    TempDbSettings VirtualMachineStorageConfigurationTempDbSettings
    An storage_settings as defined below.
    diskType String
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    storageWorkloadType String
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    dataSettings VirtualMachineStorageConfigurationDataSettings
    An storage_settings as defined below.
    logSettings VirtualMachineStorageConfigurationLogSettings
    An storage_settings as defined below.
    tempDbSettings VirtualMachineStorageConfigurationTempDbSettings
    An storage_settings as defined below.
    diskType string
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    storageWorkloadType string
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    dataSettings VirtualMachineStorageConfigurationDataSettings
    An storage_settings as defined below.
    logSettings VirtualMachineStorageConfigurationLogSettings
    An storage_settings as defined below.
    tempDbSettings VirtualMachineStorageConfigurationTempDbSettings
    An storage_settings as defined below.
    disk_type str
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    storage_workload_type str
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    data_settings VirtualMachineStorageConfigurationDataSettings
    An storage_settings as defined below.
    log_settings VirtualMachineStorageConfigurationLogSettings
    An storage_settings as defined below.
    temp_db_settings VirtualMachineStorageConfigurationTempDbSettings
    An storage_settings as defined below.
    diskType String
    The type of disk configuration to apply to the SQL Server. Valid values include NEW, EXTEND, or ADD.
    storageWorkloadType String
    The type of storage workload. Valid values include GENERAL, OLTP, or DW.
    dataSettings Property Map
    An storage_settings as defined below.
    logSettings Property Map
    An storage_settings as defined below.
    tempDbSettings Property Map
    An storage_settings as defined below.

    VirtualMachineStorageConfigurationDataSettings, VirtualMachineStorageConfigurationDataSettingsArgs

    DefaultFilePath string
    The SQL Server default path
    Luns List<int>
    A list of Logical Unit Numbers for the disks.
    DefaultFilePath string
    The SQL Server default path
    Luns []int
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Integer>
    A list of Logical Unit Numbers for the disks.
    defaultFilePath string
    The SQL Server default path
    luns number[]
    A list of Logical Unit Numbers for the disks.
    default_file_path str
    The SQL Server default path
    luns Sequence[int]
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Number>
    A list of Logical Unit Numbers for the disks.

    VirtualMachineStorageConfigurationLogSettings, VirtualMachineStorageConfigurationLogSettingsArgs

    DefaultFilePath string
    The SQL Server default path
    Luns List<int>
    A list of Logical Unit Numbers for the disks.
    DefaultFilePath string
    The SQL Server default path
    Luns []int
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Integer>
    A list of Logical Unit Numbers for the disks.
    defaultFilePath string
    The SQL Server default path
    luns number[]
    A list of Logical Unit Numbers for the disks.
    default_file_path str
    The SQL Server default path
    luns Sequence[int]
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Number>
    A list of Logical Unit Numbers for the disks.

    VirtualMachineStorageConfigurationTempDbSettings, VirtualMachineStorageConfigurationTempDbSettingsArgs

    DefaultFilePath string
    The SQL Server default path
    Luns List<int>
    A list of Logical Unit Numbers for the disks.
    DefaultFilePath string
    The SQL Server default path
    Luns []int
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Integer>
    A list of Logical Unit Numbers for the disks.
    defaultFilePath string
    The SQL Server default path
    luns number[]
    A list of Logical Unit Numbers for the disks.
    default_file_path str
    The SQL Server default path
    luns Sequence[int]
    A list of Logical Unit Numbers for the disks.
    defaultFilePath String
    The SQL Server default path
    luns List<Number>
    A list of Logical Unit Numbers for the disks.

    Import

    Sql Virtual Machines can be imported using the resource id, e.g.

     $ pulumi import azure:mssql/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/example1
    

    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.