The azure-native:datashare:ADLSGen1FolderDataSet resource, part of the Pulumi Azure Native provider, registers an ADLS Gen1 folder as a dataset within an Azure Data Share, making the folder available for sharing with consumers. This guide focuses on one capability: dataset registration within existing shares.
Datasets belong to Data Share accounts and shares, and reference ADLS Gen1 storage accounts that must exist separately. The examples are intentionally small. Combine them with your own Data Share infrastructure and storage accounts.
Add an ADLS Gen1 folder to a data share
Data providers register folders from ADLS Gen1 storage accounts as datasets within shares, making them available to consumers.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const adlsGen1FolderDataSet = new azure_native.datashare.ADLSGen1FolderDataSet("adlsGen1FolderDataSet", {
accountName: "Account1",
dataSetName: "Dataset1",
resourceGroupName: "SampleResourceGroup",
shareName: "Share1",
});
import pulumi
import pulumi_azure_native as azure_native
adls_gen1_folder_data_set = azure_native.datashare.ADLSGen1FolderDataSet("adlsGen1FolderDataSet",
account_name="Account1",
data_set_name="Dataset1",
resource_group_name="SampleResourceGroup",
share_name="Share1")
package main
import (
datashare "github.com/pulumi/pulumi-azure-native-sdk/datashare/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datashare.NewADLSGen1FolderDataSet(ctx, "adlsGen1FolderDataSet", &datashare.ADLSGen1FolderDataSetArgs{
AccountName: pulumi.String("Account1"),
DataSetName: pulumi.String("Dataset1"),
ResourceGroupName: pulumi.String("SampleResourceGroup"),
ShareName: pulumi.String("Share1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var adlsGen1FolderDataSet = new AzureNative.DataShare.ADLSGen1FolderDataSet("adlsGen1FolderDataSet", new()
{
AccountName = "Account1",
DataSetName = "Dataset1",
ResourceGroupName = "SampleResourceGroup",
ShareName = "Share1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datashare.ADLSGen1FolderDataSet;
import com.pulumi.azurenative.datashare.ADLSGen1FolderDataSetArgs;
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) {
var adlsGen1FolderDataSet = new ADLSGen1FolderDataSet("adlsGen1FolderDataSet", ADLSGen1FolderDataSetArgs.builder()
.accountName("Account1")
.dataSetName("Dataset1")
.resourceGroupName("SampleResourceGroup")
.shareName("Share1")
.build());
}
}
resources:
adlsGen1FolderDataSet:
type: azure-native:datashare:ADLSGen1FolderDataSet
properties:
accountName: Account1
dataSetName: Dataset1
resourceGroupName: SampleResourceGroup
shareName: Share1
The accountName, shareName, and dataSetName properties identify where this dataset lives in the Data Share hierarchy. The resource registers the dataset within an existing share but doesn’t specify which ADLS Gen1 folder to share; that configuration comes from additional required properties (folderPath, subscriptionId, resourceGroup, kind) not shown in this minimal example.
Beyond these examples
This snippet focuses on dataset registration within shares. It’s intentionally minimal rather than a complete data sharing configuration.
The example references pre-existing infrastructure such as Azure Data Share accounts and shares, ADLS Gen1 storage accounts with folder paths, and Azure resource groups. It focuses on dataset registration rather than provisioning the surrounding infrastructure.
To keep things focused, common dataset patterns are omitted, including:
- ADLS Gen1 account details (accountName, folderPath, subscriptionId)
- Dataset kind specification (kind property)
- Resource group targeting (resourceGroup property)
These omissions are intentional: the goal is to illustrate how dataset registration is wired, not provide drop-in data sharing modules. See the ADLS Gen1 Folder DataSet resource reference for all available configuration options.
Let's configure Azure Data Share ADLS Gen1 Folder Datasets
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Resource Configuration
accountName, folderPath, kind, resourceGroup, subscriptionId, dataSetName, resourceGroupName, and shareName. All of these are required properties.kind property must be set to AdlsGen1Folder. This is the expected value for ADLS Gen 1 folder data sets.accountName identifies the ADLS account name, while resourceGroup and subscriptionId specify where that ADLS account is located in Azure. All three are required to fully identify the ADLS account.Resource Lifecycle
dataSetName, resourceGroupName, and shareName. Changing any of these requires replacing the resource.pulumi import azure-native:datashare:ADLSGen1FolderDataSet <name> /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}dataSetId output property, which provides a unique identifier for the data set resource.