ComputeCluster

class ComputeCluster : KotlinCustomResource

Manages a Machine Learning Compute Cluster. NOTE: At this point in time the resource cannot be updated (not supported by the backend Azure Go SDK). Therefore it can only be created and deleted, not updated. At the moment, there is also no possibility to specify ssh User Account Credentials to ssh into the compute cluster.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.machinelearning.Workspace;
import com.pulumi.azure.machinelearning.WorkspaceArgs;
import com.pulumi.azure.machinelearning.inputs.WorkspaceIdentityArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.machinelearning.ComputeCluster;
import com.pulumi.azure.machinelearning.ComputeClusterArgs;
import com.pulumi.azure.machinelearning.inputs.ComputeClusterScaleSettingsArgs;
import com.pulumi.azure.machinelearning.inputs.ComputeClusterIdentityArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = CoreFunctions.getClientConfig();
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("west europe")
.tags(Map.of("stage", "example"))
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.applicationType("web")
.build());
var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.skuName("standard")
.purgeProtectionEnabled(true)
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.applicationInsightsId(exampleInsights.id())
.keyVaultId(exampleKeyVault.id())
.storageAccountId(exampleAccount.id())
.identity(WorkspaceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.1.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.1.0.0/24")
.build());
var test = new ComputeCluster("test", ComputeClusterArgs.builder()
.location(exampleResourceGroup.location())
.vmPriority("LowPriority")
.vmSize("Standard_DS2_v2")
.machineLearningWorkspaceId(exampleWorkspace.id())
.subnetResourceId(exampleSubnet.id())
.scaleSettings(ComputeClusterScaleSettingsArgs.builder()
.minNodeCount(0)
.maxNodeCount(1)
.scaleDownNodesAfterIdleDuration("PT30S")
.build())
.identity(ComputeClusterIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
}
}

Import

Machine Learning Compute Clusters can be imported using the resource id, e.g.

$ pulumi import azure:machinelearning/computeCluster:ComputeCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/cluster1

Properties

Link copied to clipboard
val description: Output<String>?

The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.

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

An identity block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard

Whether local authentication methods is enabled. Defaults to true. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard
val location: Output<String>

The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard

The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard
val name: Output<String>

The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard

Whether the compute cluster will have a public ip. To set this to false a subnet_resource_id needs to be set. Defaults to true. Changing this forces a new Machine Learning Compute Cluster to be created.

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

A scale_settings block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard
val ssh: Output<ComputeClusterSsh>?

Credentials for an administrator user account that will be created on each compute node. A ssh block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard

A boolean value indicating whether enable the public SSH port. Changing this forces a new Machine Learning Compute Cluster to be created.

Link copied to clipboard
val subnetResourceId: Output<String>?

The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.

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

A mapping of tags which should be assigned to the Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.

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

The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are Dedicated and LowPriority.

Link copied to clipboard
val vmSize: Output<String>

The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.