The azure-native:datashare:KustoDatabaseDataSetMapping resource, part of the Pulumi Azure Native provider, defines how a shared Kusto database dataset maps to a consumer’s destination cluster. This guide focuses on one capability: creating dataset mappings within share subscriptions.
Dataset mappings connect share subscriptions to destination Kusto clusters. Both the Data Share account and the share subscription must exist before you create the mapping. The examples are intentionally small. Combine them with your own Data Share infrastructure and Kusto cluster references.
Map a Kusto database dataset to a consumer cluster
Data share consumers receive datasets from providers and must map them to their own Azure resources. For Kusto databases, this mapping connects the shared dataset to a destination cluster where data synchronizes.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const kustoDatabaseDataSetMapping = new azure_native.datashare.KustoDatabaseDataSetMapping("kustoDatabaseDataSetMapping", {
accountName: "Account1",
dataSetMappingName: "DatasetMapping1",
resourceGroupName: "SampleResourceGroup",
shareSubscriptionName: "ShareSubscription1",
});
import pulumi
import pulumi_azure_native as azure_native
kusto_database_data_set_mapping = azure_native.datashare.KustoDatabaseDataSetMapping("kustoDatabaseDataSetMapping",
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.NewKustoDatabaseDataSetMapping(ctx, "kustoDatabaseDataSetMapping", &datashare.KustoDatabaseDataSetMappingArgs{
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 kustoDatabaseDataSetMapping = new AzureNative.DataShare.KustoDatabaseDataSetMapping("kustoDatabaseDataSetMapping", 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.KustoDatabaseDataSetMapping;
import com.pulumi.azurenative.datashare.KustoDatabaseDataSetMappingArgs;
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 kustoDatabaseDataSetMapping = new KustoDatabaseDataSetMapping("kustoDatabaseDataSetMapping", KustoDatabaseDataSetMappingArgs.builder()
.accountName("Account1")
.dataSetMappingName("DatasetMapping1")
.resourceGroupName("SampleResourceGroup")
.shareSubscriptionName("ShareSubscription1")
.build());
}
}
resources:
kustoDatabaseDataSetMapping:
type: azure-native:datashare:KustoDatabaseDataSetMapping
properties:
accountName: Account1
dataSetMappingName: DatasetMapping1
resourceGroupName: SampleResourceGroup
shareSubscriptionName: ShareSubscription1
The mapping sits within a specific share subscription, identified by shareSubscriptionName, which itself belongs to a Data Share account (accountName). The dataSetMappingName provides a unique identifier for this mapping within the subscription. The resource group (resourceGroupName) determines where Azure tracks the mapping resource. Note that this example shows only the mapping’s organizational properties; the actual connection to source data and destination cluster requires additional properties not shown here.
Beyond these examples
These snippets focus on dataset mapping creation for Kusto databases. They’re intentionally minimal rather than complete data sharing configurations.
The examples reference pre-existing infrastructure such as Data Share accounts, share subscriptions, and Kusto clusters (destination for synchronized data). They focus on configuring the mapping rather than provisioning the surrounding infrastructure.
To keep things focused, common mapping patterns are omitted, including:
- Source dataset identification (dataSetId)
- Destination cluster specification (kustoClusterResourceId)
- Mapping kind declaration (kind property)
- Provisioning state monitoring
These omissions are intentional: the goal is to illustrate how dataset mappings are wired, not provide drop-in data sharing modules. See the KustoDatabaseDataSetMapping resource reference for all available configuration options.
Let's configure Azure Data Share Kusto Database Mappings
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Configuration & Setup
dataSetId (the source data set id), kind (must be ‘KustoDatabase’), and kustoClusterResourceId (the sink Kusto cluster resource id).kind property must be set to ‘KustoDatabase’ for Kusto database data set mappings.accountName specifies the share account name, and shareSubscriptionName specifies the share subscription that will hold the data set sink.Immutability & Updates
accountName, dataSetMappingName, resourceGroupName, and shareSubscriptionName. Changing any of these requires recreating the resource.Monitoring & Status
dataSetMappingStatus output property to get the mapping status, and provisioningState to check the provisioning state.