VirtualMachine

class VirtualMachine : KotlinCustomResource

Manages a Microsoft SQL Virtual Machine

Example Usage

This example provisions a brief Managed Microsoft SQL Virtual Machine.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetVirtualMachineArgs;
import com.pulumi.azure.mssql.VirtualMachine;
import com.pulumi.azure.mssql.VirtualMachineArgs;
import com.pulumi.azure.mssql.inputs.VirtualMachineAutoPatchingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleVirtualMachine = ComputeFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
.name("example-vm")
.resourceGroupName("example-resources")
.build());
var exampleMssql_virtualMachineVirtualMachine = new VirtualMachine("exampleMssql/virtualMachineVirtualMachine", VirtualMachineArgs.builder()
.virtualMachineId(exampleVirtualMachine.applyValue(getVirtualMachineResult -> getVirtualMachineResult.id()))
.sqlLicenseType("PAYG")
.rServicesEnabled(true)
.sqlConnectivityPort(1433)
.sqlConnectivityType("PRIVATE")
.sqlConnectivityUpdatePassword("Password1234!")
.sqlConnectivityUpdateUsername("sqllogin")
.autoPatching(VirtualMachineAutoPatchingArgs.builder()
.dayOfWeek("Sunday")
.maintenanceWindowDurationInMinutes(60)
.maintenanceWindowStartingHour(2)
.build())
.build());
}
}

Import

Microsoft 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

Properties

Link copied to clipboard

An assessment block as defined below.

Link copied to clipboard

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.

Link copied to clipboard

An auto_patching block as defined below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

An key_vault_credential block as defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Should R Services be enabled?

Link copied to clipboard
val sqlConnectivityPort: Output<Int>?

The SQL Server port. Defaults to 1433.

Link copied to clipboard

The connectivity type used for this SQL Server. Possible values are LOCAL, PRIVATE and PUBLIC. Defaults to PRIVATE.

Link copied to clipboard

The SQL Server sysadmin login password.

Link copied to clipboard

The SQL Server sysadmin login to create.

Link copied to clipboard

A sql_instance block as defined below.

Link copied to clipboard
val sqlLicenseType: Output<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.

Link copied to clipboard

The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.

Link copied to clipboard

An storage_configuration block as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A mapping of tags to assign to the resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The ID of the Virtual Machine. Changing this forces a new resource to be created.

Link copied to clipboard

A wsfc_domain_credential block as defined below