Configure Azure Data Share ADLS Gen1 File Datasets

The azure-native:datashare:ADLSGen1FileDataSet resource, part of the Pulumi Azure Native provider, registers an ADLS Gen1 file as a dataset within an Azure Data Share share. This guide focuses on one capability: adding ADLS Gen1 files to existing shares.

This resource belongs to a Data Share share and references an ADLS Gen1 storage account that must exist separately. The example is intentionally minimal. Combine it with Data Share account and share provisioning, plus consumer-side dataset mappings for complete data sharing workflows.

Add an ADLS Gen1 file to a data share

Data providers share files from ADLS Gen1 storage accounts with consumers by adding file datasets to shares.

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const adlsGen1FileDataSet = new azure_native.datashare.ADLSGen1FileDataSet("adlsGen1FileDataSet", {
    accountName: "Account1",
    dataSetName: "Dataset1",
    resourceGroupName: "SampleResourceGroup",
    shareName: "Share1",
});
import pulumi
import pulumi_azure_native as azure_native

adls_gen1_file_data_set = azure_native.datashare.ADLSGen1FileDataSet("adlsGen1FileDataSet",
    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.NewADLSGen1FileDataSet(ctx, "adlsGen1FileDataSet", &datashare.ADLSGen1FileDataSetArgs{
			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 adlsGen1FileDataSet = new AzureNative.DataShare.ADLSGen1FileDataSet("adlsGen1FileDataSet", 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.ADLSGen1FileDataSet;
import com.pulumi.azurenative.datashare.ADLSGen1FileDataSetArgs;
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 adlsGen1FileDataSet = new ADLSGen1FileDataSet("adlsGen1FileDataSet", ADLSGen1FileDataSetArgs.builder()
            .accountName("Account1")
            .dataSetName("Dataset1")
            .resourceGroupName("SampleResourceGroup")
            .shareName("Share1")
            .build());

    }
}
resources:
  adlsGen1FileDataSet:
    type: azure-native:datashare:ADLSGen1FileDataSet
    properties:
      accountName: Account1
      dataSetName: Dataset1
      resourceGroupName: SampleResourceGroup
      shareName: Share1

The accountName identifies the Data Share account, while shareName specifies which share receives the dataset. The dataSetName provides a logical identifier for this dataset within the share. This configuration registers the dataset but doesn’t specify which ADLS Gen1 file to share; those details (fileName, folderPath, the ADLS Gen1 account details) are provided through additional required properties 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 Data Share accounts, Data Share shares, and ADLS Gen1 storage accounts with files. It focuses on dataset registration rather than provisioning the surrounding infrastructure.

To keep things focused, common dataset patterns are omitted, including:

  • ADLS Gen1 account configuration (accountName, subscriptionId, resourceGroup)
  • File path specification (fileName, folderPath)
  • Dataset kind discriminator (kind property)
  • Consumer-side dataset mappings and synchronization

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 File DataSet resource reference for all available configuration options.

Let's configure Azure Data Share ADLS Gen1 File Datasets

Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.

Try Pulumi Cloud for FREE

Frequently Asked Questions

Resource Configuration
What properties are required to create an ADLS Gen 1 file data set?
You must provide six required properties: accountName (ADLS account name), fileName, folderPath, kind (must be ‘AdlsGen1File’), resourceGroup (ADLS resource group), and subscriptionId (ADLS subscription ID).
What value should I use for the kind property?
The kind property must be set to ‘AdlsGen1File’ for this resource type.
What's the difference between the two accountName properties?
The accountName input property refers to your ADLS Gen 1 storage account name. The accountName in the resource path (used in examples and imports) refers to your Azure Data Share account name. These are two different Azure resources.
Immutability & Lifecycle
Which properties can't be changed after creating the data set?
Three properties are immutable: dataSetName, resourceGroupName, and shareName. Changing any of these requires replacing the resource.
How do I import an existing ADLS Gen 1 file data set?
Use the resource ID format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}

Using a different cloud?

Explore analytics guides for other cloud providers: