import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Machine Learning Compute Instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const current = azure.core.getClientConfig({}); * const example = new azure.core.ResourceGroup("example", { * name: "example-rg", * location: "west europe", * tags: { * stage: "example", * }, * }); * const exampleInsights = new azure.appinsights.Insights("example", { * name: "example-ai", * location: example.location, * resourceGroupName: example.name, * applicationType: "web", * }); * const exampleKeyVault = new azure.keyvault.KeyVault("example", { * name: "example-kv", * location: example.location, * resourceGroupName: example.name, * tenantId: current.then(current => current.tenantId), * skuName: "standard", * purgeProtectionEnabled: true, * }); * const exampleAccount = new azure.storage.Account("example", { * name: "examplesa", * location: example.location, * resourceGroupName: example.name, * accountTier: "Standard", * accountReplicationType: "LRS", * }); * const exampleWorkspace = new azure.machinelearning.Workspace("example", { * name: "example-mlw", * location: example.location, * resourceGroupName: example.name, * applicationInsightsId: exampleInsights.id, * keyVaultId: exampleKeyVault.id, * storageAccountId: exampleAccount.id, * identity: { * type: "SystemAssigned", * }, * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "example-vnet", * addressSpaces: ["10.1.0.0/16"], * location: example.location, * resourceGroupName: example.name, * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "example-subnet", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.1.0.0/24"], * }); * const config = new pulumi.Config(); * const sshKey = config.get("sshKey") || "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+L2NxRIfQ781rxV6Iq5jSav6b2Q8z5KiseOlvKA/RF2wqU0UPYqQviQhLmW6THTpmrv/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+5N2Ta6UYH3lsDf9R9wTP2K/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+7HTcWfdu0qQqPWY5ujyMw/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt terraform@demo.tld"; * const exampleComputeInstance = new azure.machinelearning.ComputeInstance("example", { * name: "example", * machineLearningWorkspaceId: exampleWorkspace.id, * virtualMachineSize: "STANDARD_DS2_V2", * authorizationType: "personal", * ssh: { * publicKey: sshKey, * }, * subnetResourceId: exampleSubnet.id, * description: "foo", * tags: { * foo: "bar", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.MachineLearningServices` - 2025-06-01 * * ## Import * * Machine Learning Compute Instances can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:machinelearning/computeInstance:ComputeInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1 * ``` */ export declare class ComputeInstance extends pulumi.CustomResource { /** * Get an existing ComputeInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ComputeInstanceState, opts?: pulumi.CustomResourceOptions): ComputeInstance; /** * Returns true if the given object is an instance of ComputeInstance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ComputeInstance; /** * A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly assignToUser: pulumi.Output; /** * The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly authorizationType: pulumi.Output; /** * The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly description: pulumi.Output; /** * An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly identity: pulumi.Output; /** * Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly localAuthEnabled: pulumi.Output; /** * The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly machineLearningWorkspaceId: pulumi.Output; /** * The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly name: pulumi.Output; /** * Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created. * * > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`). */ readonly nodePublicIpEnabled: pulumi.Output; /** * A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly ssh: pulumi.Output; /** * Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created. * * > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking. */ readonly subnetResourceId: pulumi.Output; /** * A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created. */ readonly virtualMachineSize: pulumi.Output; /** * Create a ComputeInstance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ComputeInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ComputeInstance resources. */ export interface ComputeInstanceState { /** * A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created. */ assignToUser?: pulumi.Input; /** * The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created. */ authorizationType?: pulumi.Input; /** * The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ description?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created. */ identity?: pulumi.Input; /** * Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created. */ localAuthEnabled?: pulumi.Input; /** * The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created. */ machineLearningWorkspaceId?: pulumi.Input; /** * The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ name?: pulumi.Input; /** * Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created. * * > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`). */ nodePublicIpEnabled?: pulumi.Input; /** * A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created. */ ssh?: pulumi.Input; /** * Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created. * * > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking. */ subnetResourceId?: pulumi.Input; /** * A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created. */ virtualMachineSize?: pulumi.Input; } /** * The set of arguments for constructing a ComputeInstance resource. */ export interface ComputeInstanceArgs { /** * A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created. */ assignToUser?: pulumi.Input; /** * The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created. */ authorizationType?: pulumi.Input; /** * The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ description?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created. */ identity?: pulumi.Input; /** * Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created. */ localAuthEnabled?: pulumi.Input; /** * The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created. */ machineLearningWorkspaceId: pulumi.Input; /** * The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ name?: pulumi.Input; /** * Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created. * * > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`). */ nodePublicIpEnabled?: pulumi.Input; /** * A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created. */ ssh?: pulumi.Input; /** * Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created. * * > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking. */ subnetResourceId?: pulumi.Input; /** * A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created. */ virtualMachineSize: pulumi.Input; }