Configure Azure Data Share Blob Folder Mappings

The azure-native:datashare:BlobFolderDataSetMapping resource, part of the Pulumi Azure Native provider, defines how a shared blob folder dataset maps to a consumer’s storage account, specifying the destination container and folder prefix. This guide focuses on one capability: mapping blob folder datasets to storage containers.

Dataset mappings belong to share subscriptions, which are created when you accept a data sharing invitation. The mapping requires an existing Data Share account, an active share subscription, and a target storage account with a container. The examples are intentionally small. Combine them with your own Data Share infrastructure and storage configuration.

Map a blob folder dataset to storage

When you accept a data share invitation, you create mappings that route incoming datasets to your storage accounts.

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

const blobFolderDataSetMapping = new azure_native.datashare.BlobFolderDataSetMapping("blobFolderDataSetMapping", {
    accountName: "Account1",
    dataSetMappingName: "DatasetMapping1",
    resourceGroupName: "SampleResourceGroup",
    shareSubscriptionName: "ShareSubscription1",
});
import pulumi
import pulumi_azure_native as azure_native

blob_folder_data_set_mapping = azure_native.datashare.BlobFolderDataSetMapping("blobFolderDataSetMapping",
    account_name="Account1",
    data_set_mapping_name="DatasetMapping1",
    resource_group_name="SampleResourceGroup",
    share_subscription_name="ShareSubscription1")
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.NewBlobFolderDataSetMapping(ctx, "blobFolderDataSetMapping", &datashare.BlobFolderDataSetMappingArgs{
			AccountName:           pulumi.String("Account1"),
			DataSetMappingName:    pulumi.String("DatasetMapping1"),
			ResourceGroupName:     pulumi.String("SampleResourceGroup"),
			ShareSubscriptionName: pulumi.String("ShareSubscription1"),
		})
		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 blobFolderDataSetMapping = new AzureNative.DataShare.BlobFolderDataSetMapping("blobFolderDataSetMapping", new()
    {
        AccountName = "Account1",
        DataSetMappingName = "DatasetMapping1",
        ResourceGroupName = "SampleResourceGroup",
        ShareSubscriptionName = "ShareSubscription1",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datashare.BlobFolderDataSetMapping;
import com.pulumi.azurenative.datashare.BlobFolderDataSetMappingArgs;
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 blobFolderDataSetMapping = new BlobFolderDataSetMapping("blobFolderDataSetMapping", BlobFolderDataSetMappingArgs.builder()
            .accountName("Account1")
            .dataSetMappingName("DatasetMapping1")
            .resourceGroupName("SampleResourceGroup")
            .shareSubscriptionName("ShareSubscription1")
            .build());

    }
}
resources:
  blobFolderDataSetMapping:
    type: azure-native:datashare:BlobFolderDataSetMapping
    properties:
      accountName: Account1
      dataSetMappingName: DatasetMapping1
      resourceGroupName: SampleResourceGroup
      shareSubscriptionName: ShareSubscription1

The mapping connects a source dataset (via dataSetId) to your storage infrastructure. The accountName and shareSubscriptionName identify where the mapping lives. The containerName and prefix specify where data lands in your storage account. The storageAccountName, resourceGroup, and subscriptionId point to your target storage. When the provider sends data, Azure Data Share writes it to your specified container and folder prefix.

Beyond these examples

This snippet focuses on blob folder dataset mapping configuration. It’s intentionally minimal rather than a full data sharing workflow.

The example references pre-existing infrastructure such as Data Share accounts, share subscriptions (from accepted invitations), storage accounts, containers, and resource groups, and source datasets from data providers. It focuses on configuring the mapping rather than provisioning the surrounding infrastructure.

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

  • Dataset mapping for other storage types (ADLS Gen2, SQL, Synapse)
  • Mapping validation and provisioning state handling
  • Cross-subscription or cross-region mapping scenarios
  • Mapping updates or reconfiguration

These omissions are intentional: the goal is to illustrate how blob folder mappings are wired, not provide drop-in data sharing modules. See the BlobFolderDataSetMapping resource reference for all available configuration options.

Let's configure Azure Data Share Blob Folder Mappings

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 value must I use for the kind property?
The kind property must be set to BlobFolder for blob folder data set mappings.
What storage account information do I need to provide?
You must specify containerName, storageAccountName, resourceGroup, and subscriptionId to identify the source storage account and container. Additionally, provide prefix for the blob folder path and dataSetId to reference the source data set.
Immutability & Updates
What properties can't be changed after creating the mapping?
The accountName, dataSetMappingName, resourceGroupName, and shareSubscriptionName properties are immutable and cannot be modified after creation.
Status & Monitoring
How can I monitor the status of my data set mapping?
Check the dataSetMappingStatus output property for the current mapping status, and provisioningState for the provisioning state.

Using a different cloud?

Explore integration guides for other cloud providers: