DatastoreFileshare

class DatastoreFileshare : KotlinCustomResource

Manages a Machine Learning File Share DataStore.

Example Usage

With Azure File Share

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-resources",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "workspace-example-ai",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const exampleKeyVault = new azure.keyvault.KeyVault("example", {
name: "workspaceexamplekeyvault",
location: example.location,
resourceGroupName: example.name,
tenantId: current.then(current => current.tenantId),
skuName: "premium",
});
const exampleAccount = new azure.storage.Account("example", {
name: "workspacestorageaccount",
location: example.location,
resourceGroupName: example.name,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleWorkspace = new azure.machinelearning.Workspace("example", {
name: "example-workspace",
location: example.location,
resourceGroupName: example.name,
applicationInsightsId: exampleInsights.id,
keyVaultId: exampleKeyVault.id,
storageAccountId: exampleAccount.id,
identity: {
type: "SystemAssigned",
},
});
const exampleShare = new azure.storage.Share("example", {
name: "example",
storageAccountName: exampleAccount.name,
quota: 1,
});
const exampleDatastoreFileshare = new azure.machinelearning.DatastoreFileshare("example", {
name: "example-datastore",
workspaceId: exampleWorkspace.id,
storageFileshareId: exampleShare.resourceManagerId,
accountKey: exampleAccount.primaryAccessKey,
});
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="workspace-example-ai",
location=example.location,
resource_group_name=example.name,
application_type="web")
example_key_vault = azure.keyvault.KeyVault("example",
name="workspaceexamplekeyvault",
location=example.location,
resource_group_name=example.name,
tenant_id=current.tenant_id,
sku_name="premium")
example_account = azure.storage.Account("example",
name="workspacestorageaccount",
location=example.location,
resource_group_name=example.name,
account_tier="Standard",
account_replication_type="GRS")
example_workspace = azure.machinelearning.Workspace("example",
name="example-workspace",
location=example.location,
resource_group_name=example.name,
application_insights_id=example_insights.id,
key_vault_id=example_key_vault.id,
storage_account_id=example_account.id,
identity={
"type": "SystemAssigned",
})
example_share = azure.storage.Share("example",
name="example",
storage_account_name=example_account.name,
quota=1)
example_datastore_fileshare = azure.machinelearning.DatastoreFileshare("example",
name="example-datastore",
workspace_id=example_workspace.id,
storage_fileshare_id=example_share.resource_manager_id,
account_key=example_account.primary_access_key)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var current = Azure.Core.GetClientConfig.Invoke();
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "workspace-example-ai",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
{
Name = "workspaceexamplekeyvault",
Location = example.Location,
ResourceGroupName = example.Name,
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
SkuName = "premium",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "workspacestorageaccount",
Location = example.Location,
ResourceGroupName = example.Name,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleWorkspace = new Azure.MachineLearning.Workspace("example", new()
{
Name = "example-workspace",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationInsightsId = exampleInsights.Id,
KeyVaultId = exampleKeyVault.Id,
StorageAccountId = exampleAccount.Id,
Identity = new Azure.MachineLearning.Inputs.WorkspaceIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleShare = new Azure.Storage.Share("example", new()
{
Name = "example",
StorageAccountName = exampleAccount.Name,
Quota = 1,
});
var exampleDatastoreFileshare = new Azure.MachineLearning.DatastoreFileshare("example", new()
{
Name = "example-datastore",
WorkspaceId = exampleWorkspace.Id,
StorageFileshareId = exampleShare.ResourceManagerId,
AccountKey = exampleAccount.PrimaryAccessKey,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("workspace-example-ai"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
Name: pulumi.String("workspaceexamplekeyvault"),
Location: example.Location,
ResourceGroupName: example.Name,
TenantId: pulumi.String(current.TenantId),
SkuName: pulumi.String("premium"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("workspacestorageaccount"),
Location: example.Location,
ResourceGroupName: example.Name,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
Name: pulumi.String("example-workspace"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationInsightsId: exampleInsights.ID(),
KeyVaultId: exampleKeyVault.ID(),
StorageAccountId: exampleAccount.ID(),
Identity: &machinelearning.WorkspaceIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
Name: pulumi.String("example"),
StorageAccountName: exampleAccount.Name,
Quota: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = machinelearning.NewDatastoreFileshare(ctx, "example", &machinelearning.DatastoreFileshareArgs{
Name: pulumi.String("example-datastore"),
WorkspaceId: exampleWorkspace.ID(),
StorageFileshareId: exampleShare.ResourceManagerId,
AccountKey: exampleAccount.PrimaryAccessKey,
})
if err != nil {
return err
}
return nil
})
}
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.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.machinelearning.DatastoreFileshare;
import com.pulumi.azure.machinelearning.DatastoreFileshareArgs;
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(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("workspace-example-ai")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
.name("workspaceexamplekeyvault")
.location(example.location())
.resourceGroupName(example.name())
.tenantId(current.tenantId())
.skuName("premium")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("workspacestorageaccount")
.location(example.location())
.resourceGroupName(example.name())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.name("example-workspace")
.location(example.location())
.resourceGroupName(example.name())
.applicationInsightsId(exampleInsights.id())
.keyVaultId(exampleKeyVault.id())
.storageAccountId(exampleAccount.id())
.identity(WorkspaceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.name("example")
.storageAccountName(exampleAccount.name())
.quota(1)
.build());
var exampleDatastoreFileshare = new DatastoreFileshare("exampleDatastoreFileshare", DatastoreFileshareArgs.builder()
.name("example-datastore")
.workspaceId(exampleWorkspace.id())
.storageFileshareId(exampleShare.resourceManagerId())
.accountKey(exampleAccount.primaryAccessKey())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: workspace-example-ai
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
exampleKeyVault:
type: azure:keyvault:KeyVault
name: example
properties:
name: workspaceexamplekeyvault
location: ${example.location}
resourceGroupName: ${example.name}
tenantId: ${current.tenantId}
skuName: premium
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: workspacestorageaccount
location: ${example.location}
resourceGroupName: ${example.name}
accountTier: Standard
accountReplicationType: GRS
exampleWorkspace:
type: azure:machinelearning:Workspace
name: example
properties:
name: example-workspace
location: ${example.location}
resourceGroupName: ${example.name}
applicationInsightsId: ${exampleInsights.id}
keyVaultId: ${exampleKeyVault.id}
storageAccountId: ${exampleAccount.id}
identity:
type: SystemAssigned
exampleShare:
type: azure:storage:Share
name: example
properties:
name: example
storageAccountName: ${exampleAccount.name}
quota: 1
exampleDatastoreFileshare:
type: azure:machinelearning:DatastoreFileshare
name: example
properties:
name: example-datastore
workspaceId: ${exampleWorkspace.id}
storageFileshareId: ${exampleShare.resourceManagerId}
accountKey: ${exampleAccount.primaryAccessKey}
variables:
current:
fn::invoke:
function: azure:core:getClientConfig
arguments: {}

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.MachineLearningServices: 2024-04-01

Import

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

$ pulumi import azure:machinelearning/datastoreFileshare:DatastoreFileshare example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/mlw1/dataStores/datastore1

Properties

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

The access key of the Storage Account. Conflicts with shared_access_signature.

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

Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.

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

Indicate whether this Machines Learning DataStore is the default for the Workspace.

Link copied to clipboard
val name: Output<String>

The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.

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

Specifies which identity to use when retrieving data from the specified source. Defaults to None. Possible values are None, WorkspaceSystemAssignedIdentity and WorkspaceUserAssignedIdentity.

Link copied to clipboard

The Shared Access Signature of the Storage Account. Conflicts with account_key.

Link copied to clipboard

The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore 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 DataStore. Changing this forces a new Machine Learning DataStore to be created.

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

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