Configure Azure Cost Management Exports

The azure-native:costmanagement:Export resource, part of the Pulumi Azure Native provider, defines automated cost data exports that write usage and billing information to Azure Storage on a schedule. This guide focuses on two capabilities: scheduled exports to Storage containers and scope-based cost aggregation across billing accounts, management groups, and subscriptions.

Exports write to existing Storage accounts and require system-assigned managed identities with Storage Blob Data Contributor permissions on the target container. The examples are intentionally small. Combine them with your own Storage infrastructure and identity configuration.

Export daily cost data to Storage on a schedule

Finance teams often need automated cost reports delivered to Storage for analysis in Excel, Power BI, or custom tooling.

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

const _export = new azure_native.costmanagement.Export("export", {
    definition: {
        dataSet: {
            configuration: {
                columns: [
                    "Date",
                    "MeterId",
                    "ResourceId",
                    "ResourceLocation",
                    "Quantity",
                ],
            },
            granularity: azure_native.costmanagement.GranularityType.Daily,
        },
        timeframe: azure_native.costmanagement.TimeframeType.MonthToDate,
        type: azure_native.costmanagement.ExportType.ActualCost,
    },
    deliveryInfo: {
        destination: {
            container: "exports",
            resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
            rootFolderPath: "ad-hoc",
        },
    },
    exportName: "TestExport",
    format: azure_native.costmanagement.FormatType.Csv,
    identity: {
        type: azure_native.costmanagement.SystemAssignedServiceIdentityType.SystemAssigned,
    },
    location: "centralus",
    schedule: {
        recurrence: azure_native.costmanagement.RecurrenceType.Weekly,
        recurrencePeriod: {
            from: "2020-06-01T00:00:00Z",
            to: "2020-10-31T00:00:00Z",
        },
        status: azure_native.costmanagement.StatusType.Active,
    },
    scope: "providers/Microsoft.Billing/billingAccounts/123456",
});
import pulumi
import pulumi_azure_native as azure_native

export = azure_native.costmanagement.Export("export",
    definition={
        "data_set": {
            "configuration": {
                "columns": [
                    "Date",
                    "MeterId",
                    "ResourceId",
                    "ResourceLocation",
                    "Quantity",
                ],
            },
            "granularity": azure_native.costmanagement.GranularityType.DAILY,
        },
        "timeframe": azure_native.costmanagement.TimeframeType.MONTH_TO_DATE,
        "type": azure_native.costmanagement.ExportType.ACTUAL_COST,
    },
    delivery_info={
        "destination": {
            "container": "exports",
            "resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
            "root_folder_path": "ad-hoc",
        },
    },
    export_name="TestExport",
    format=azure_native.costmanagement.FormatType.CSV,
    identity={
        "type": azure_native.costmanagement.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
    },
    location="centralus",
    schedule={
        "recurrence": azure_native.costmanagement.RecurrenceType.WEEKLY,
        "recurrence_period": {
            "from_": "2020-06-01T00:00:00Z",
            "to": "2020-10-31T00:00:00Z",
        },
        "status": azure_native.costmanagement.StatusType.ACTIVE,
    },
    scope="providers/Microsoft.Billing/billingAccounts/123456")
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costmanagement.NewExport(ctx, "export", &costmanagement.ExportArgs{
			Definition: &costmanagement.ExportDefinitionArgs{
				DataSet: &costmanagement.ExportDatasetArgs{
					Configuration: &costmanagement.ExportDatasetConfigurationArgs{
						Columns: pulumi.StringArray{
							pulumi.String("Date"),
							pulumi.String("MeterId"),
							pulumi.String("ResourceId"),
							pulumi.String("ResourceLocation"),
							pulumi.String("Quantity"),
						},
					},
					Granularity: pulumi.String(costmanagement.GranularityTypeDaily),
				},
				Timeframe: pulumi.String(costmanagement.TimeframeTypeMonthToDate),
				Type:      pulumi.String(costmanagement.ExportTypeActualCost),
			},
			DeliveryInfo: &costmanagement.ExportDeliveryInfoArgs{
				Destination: &costmanagement.ExportDeliveryDestinationArgs{
					Container:      pulumi.String("exports"),
					ResourceId:     pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
					RootFolderPath: pulumi.String("ad-hoc"),
				},
			},
			ExportName: pulumi.String("TestExport"),
			Format:     pulumi.String(costmanagement.FormatTypeCsv),
			Identity: &costmanagement.SystemAssignedServiceIdentityArgs{
				Type: pulumi.String(costmanagement.SystemAssignedServiceIdentityTypeSystemAssigned),
			},
			Location: pulumi.String("centralus"),
			Schedule: &costmanagement.ExportScheduleArgs{
				Recurrence: pulumi.String(costmanagement.RecurrenceTypeWeekly),
				RecurrencePeriod: &costmanagement.ExportRecurrencePeriodArgs{
					From: pulumi.String("2020-06-01T00:00:00Z"),
					To:   pulumi.String("2020-10-31T00:00:00Z"),
				},
				Status: pulumi.String(costmanagement.StatusTypeActive),
			},
			Scope: pulumi.String("providers/Microsoft.Billing/billingAccounts/123456"),
		})
		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 export = new AzureNative.CostManagement.Export("export", new()
    {
        Definition = new AzureNative.CostManagement.Inputs.ExportDefinitionArgs
        {
            DataSet = new AzureNative.CostManagement.Inputs.ExportDatasetArgs
            {
                Configuration = new AzureNative.CostManagement.Inputs.ExportDatasetConfigurationArgs
                {
                    Columns = new[]
                    {
                        "Date",
                        "MeterId",
                        "ResourceId",
                        "ResourceLocation",
                        "Quantity",
                    },
                },
                Granularity = AzureNative.CostManagement.GranularityType.Daily,
            },
            Timeframe = AzureNative.CostManagement.TimeframeType.MonthToDate,
            Type = AzureNative.CostManagement.ExportType.ActualCost,
        },
        DeliveryInfo = new AzureNative.CostManagement.Inputs.ExportDeliveryInfoArgs
        {
            Destination = new AzureNative.CostManagement.Inputs.ExportDeliveryDestinationArgs
            {
                Container = "exports",
                ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
                RootFolderPath = "ad-hoc",
            },
        },
        ExportName = "TestExport",
        Format = AzureNative.CostManagement.FormatType.Csv,
        Identity = new AzureNative.CostManagement.Inputs.SystemAssignedServiceIdentityArgs
        {
            Type = AzureNative.CostManagement.SystemAssignedServiceIdentityType.SystemAssigned,
        },
        Location = "centralus",
        Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
        {
            Recurrence = AzureNative.CostManagement.RecurrenceType.Weekly,
            RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
            {
                From = "2020-06-01T00:00:00Z",
                To = "2020-10-31T00:00:00Z",
            },
            Status = AzureNative.CostManagement.StatusType.Active,
        },
        Scope = "providers/Microsoft.Billing/billingAccounts/123456",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Export;
import com.pulumi.azurenative.costmanagement.ExportArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDefinitionArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetConfigurationArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryInfoArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryDestinationArgs;
import com.pulumi.azurenative.costmanagement.inputs.SystemAssignedServiceIdentityArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportScheduleArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportRecurrencePeriodArgs;
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 export = new Export("export", ExportArgs.builder()
            .definition(ExportDefinitionArgs.builder()
                .dataSet(ExportDatasetArgs.builder()
                    .configuration(ExportDatasetConfigurationArgs.builder()
                        .columns(                        
                            "Date",
                            "MeterId",
                            "ResourceId",
                            "ResourceLocation",
                            "Quantity")
                        .build())
                    .granularity("Daily")
                    .build())
                .timeframe("MonthToDate")
                .type("ActualCost")
                .build())
            .deliveryInfo(ExportDeliveryInfoArgs.builder()
                .destination(ExportDeliveryDestinationArgs.builder()
                    .container("exports")
                    .resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
                    .rootFolderPath("ad-hoc")
                    .build())
                .build())
            .exportName("TestExport")
            .format("Csv")
            .identity(SystemAssignedServiceIdentityArgs.builder()
                .type("SystemAssigned")
                .build())
            .location("centralus")
            .schedule(ExportScheduleArgs.builder()
                .recurrence("Weekly")
                .recurrencePeriod(ExportRecurrencePeriodArgs.builder()
                    .from("2020-06-01T00:00:00Z")
                    .to("2020-10-31T00:00:00Z")
                    .build())
                .status("Active")
                .build())
            .scope("providers/Microsoft.Billing/billingAccounts/123456")
            .build());

    }
}
resources:
  export:
    type: azure-native:costmanagement:Export
    properties:
      definition:
        dataSet:
          configuration:
            columns:
              - Date
              - MeterId
              - ResourceId
              - ResourceLocation
              - Quantity
          granularity: Daily
        timeframe: MonthToDate
        type: ActualCost
      deliveryInfo:
        destination:
          container: exports
          resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182
          rootFolderPath: ad-hoc
      exportName: TestExport
      format: Csv
      identity:
        type: SystemAssigned
      location: centralus
      schedule:
        recurrence: Weekly
        recurrencePeriod:
          from: 2020-06-01T00:00:00Z
          to: 2020-10-31T00:00:00Z
        status: Active
      scope: providers/Microsoft.Billing/billingAccounts/123456

The export runs on the schedule you define, writing CSV files to the specified Storage container. The definition block controls what data gets exported: dataSet.granularity sets the aggregation level (Daily in this case), timeframe determines the date range (MonthToDate captures the current month), and type specifies ActualCost versus AmortizedCost. The deliveryInfo.destination points to your Storage account by resource ID, with container and rootFolderPath controlling where files land. The schedule.recurrence property sets how often the export runs (Weekly here), with recurrencePeriod defining the active date range. The system-assigned identity needs Storage Blob Data Contributor role on the target container to write files.

Export costs across multiple subscriptions via management group

Organizations with multiple subscriptions often consolidate cost data at the management group level to track spending across teams or business units.

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

const _export = new azure_native.costmanagement.Export("export", {
    definition: {
        dataSet: {
            configuration: {
                columns: [
                    "Date",
                    "MeterId",
                    "ResourceId",
                    "ResourceLocation",
                    "Quantity",
                ],
            },
            granularity: azure_native.costmanagement.GranularityType.Daily,
        },
        timeframe: azure_native.costmanagement.TimeframeType.MonthToDate,
        type: azure_native.costmanagement.ExportType.ActualCost,
    },
    deliveryInfo: {
        destination: {
            container: "exports",
            resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
            rootFolderPath: "ad-hoc",
        },
    },
    exportName: "TestExport",
    format: azure_native.costmanagement.FormatType.Csv,
    identity: {
        type: azure_native.costmanagement.SystemAssignedServiceIdentityType.SystemAssigned,
    },
    location: "centralus",
    schedule: {
        recurrence: azure_native.costmanagement.RecurrenceType.Weekly,
        recurrencePeriod: {
            from: "2020-06-01T00:00:00Z",
            to: "2020-10-31T00:00:00Z",
        },
        status: azure_native.costmanagement.StatusType.Active,
    },
    scope: "providers/Microsoft.Management/managementGroups/TestMG",
});
import pulumi
import pulumi_azure_native as azure_native

export = azure_native.costmanagement.Export("export",
    definition={
        "data_set": {
            "configuration": {
                "columns": [
                    "Date",
                    "MeterId",
                    "ResourceId",
                    "ResourceLocation",
                    "Quantity",
                ],
            },
            "granularity": azure_native.costmanagement.GranularityType.DAILY,
        },
        "timeframe": azure_native.costmanagement.TimeframeType.MONTH_TO_DATE,
        "type": azure_native.costmanagement.ExportType.ACTUAL_COST,
    },
    delivery_info={
        "destination": {
            "container": "exports",
            "resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
            "root_folder_path": "ad-hoc",
        },
    },
    export_name="TestExport",
    format=azure_native.costmanagement.FormatType.CSV,
    identity={
        "type": azure_native.costmanagement.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
    },
    location="centralus",
    schedule={
        "recurrence": azure_native.costmanagement.RecurrenceType.WEEKLY,
        "recurrence_period": {
            "from_": "2020-06-01T00:00:00Z",
            "to": "2020-10-31T00:00:00Z",
        },
        "status": azure_native.costmanagement.StatusType.ACTIVE,
    },
    scope="providers/Microsoft.Management/managementGroups/TestMG")
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costmanagement.NewExport(ctx, "export", &costmanagement.ExportArgs{
			Definition: &costmanagement.ExportDefinitionArgs{
				DataSet: &costmanagement.ExportDatasetArgs{
					Configuration: &costmanagement.ExportDatasetConfigurationArgs{
						Columns: pulumi.StringArray{
							pulumi.String("Date"),
							pulumi.String("MeterId"),
							pulumi.String("ResourceId"),
							pulumi.String("ResourceLocation"),
							pulumi.String("Quantity"),
						},
					},
					Granularity: pulumi.String(costmanagement.GranularityTypeDaily),
				},
				Timeframe: pulumi.String(costmanagement.TimeframeTypeMonthToDate),
				Type:      pulumi.String(costmanagement.ExportTypeActualCost),
			},
			DeliveryInfo: &costmanagement.ExportDeliveryInfoArgs{
				Destination: &costmanagement.ExportDeliveryDestinationArgs{
					Container:      pulumi.String("exports"),
					ResourceId:     pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
					RootFolderPath: pulumi.String("ad-hoc"),
				},
			},
			ExportName: pulumi.String("TestExport"),
			Format:     pulumi.String(costmanagement.FormatTypeCsv),
			Identity: &costmanagement.SystemAssignedServiceIdentityArgs{
				Type: pulumi.String(costmanagement.SystemAssignedServiceIdentityTypeSystemAssigned),
			},
			Location: pulumi.String("centralus"),
			Schedule: &costmanagement.ExportScheduleArgs{
				Recurrence: pulumi.String(costmanagement.RecurrenceTypeWeekly),
				RecurrencePeriod: &costmanagement.ExportRecurrencePeriodArgs{
					From: pulumi.String("2020-06-01T00:00:00Z"),
					To:   pulumi.String("2020-10-31T00:00:00Z"),
				},
				Status: pulumi.String(costmanagement.StatusTypeActive),
			},
			Scope: pulumi.String("providers/Microsoft.Management/managementGroups/TestMG"),
		})
		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 export = new AzureNative.CostManagement.Export("export", new()
    {
        Definition = new AzureNative.CostManagement.Inputs.ExportDefinitionArgs
        {
            DataSet = new AzureNative.CostManagement.Inputs.ExportDatasetArgs
            {
                Configuration = new AzureNative.CostManagement.Inputs.ExportDatasetConfigurationArgs
                {
                    Columns = new[]
                    {
                        "Date",
                        "MeterId",
                        "ResourceId",
                        "ResourceLocation",
                        "Quantity",
                    },
                },
                Granularity = AzureNative.CostManagement.GranularityType.Daily,
            },
            Timeframe = AzureNative.CostManagement.TimeframeType.MonthToDate,
            Type = AzureNative.CostManagement.ExportType.ActualCost,
        },
        DeliveryInfo = new AzureNative.CostManagement.Inputs.ExportDeliveryInfoArgs
        {
            Destination = new AzureNative.CostManagement.Inputs.ExportDeliveryDestinationArgs
            {
                Container = "exports",
                ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
                RootFolderPath = "ad-hoc",
            },
        },
        ExportName = "TestExport",
        Format = AzureNative.CostManagement.FormatType.Csv,
        Identity = new AzureNative.CostManagement.Inputs.SystemAssignedServiceIdentityArgs
        {
            Type = AzureNative.CostManagement.SystemAssignedServiceIdentityType.SystemAssigned,
        },
        Location = "centralus",
        Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
        {
            Recurrence = AzureNative.CostManagement.RecurrenceType.Weekly,
            RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
            {
                From = "2020-06-01T00:00:00Z",
                To = "2020-10-31T00:00:00Z",
            },
            Status = AzureNative.CostManagement.StatusType.Active,
        },
        Scope = "providers/Microsoft.Management/managementGroups/TestMG",
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Export;
import com.pulumi.azurenative.costmanagement.ExportArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDefinitionArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetConfigurationArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryInfoArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryDestinationArgs;
import com.pulumi.azurenative.costmanagement.inputs.SystemAssignedServiceIdentityArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportScheduleArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportRecurrencePeriodArgs;
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 export = new Export("export", ExportArgs.builder()
            .definition(ExportDefinitionArgs.builder()
                .dataSet(ExportDatasetArgs.builder()
                    .configuration(ExportDatasetConfigurationArgs.builder()
                        .columns(                        
                            "Date",
                            "MeterId",
                            "ResourceId",
                            "ResourceLocation",
                            "Quantity")
                        .build())
                    .granularity("Daily")
                    .build())
                .timeframe("MonthToDate")
                .type("ActualCost")
                .build())
            .deliveryInfo(ExportDeliveryInfoArgs.builder()
                .destination(ExportDeliveryDestinationArgs.builder()
                    .container("exports")
                    .resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
                    .rootFolderPath("ad-hoc")
                    .build())
                .build())
            .exportName("TestExport")
            .format("Csv")
            .identity(SystemAssignedServiceIdentityArgs.builder()
                .type("SystemAssigned")
                .build())
            .location("centralus")
            .schedule(ExportScheduleArgs.builder()
                .recurrence("Weekly")
                .recurrencePeriod(ExportRecurrencePeriodArgs.builder()
                    .from("2020-06-01T00:00:00Z")
                    .to("2020-10-31T00:00:00Z")
                    .build())
                .status("Active")
                .build())
            .scope("providers/Microsoft.Management/managementGroups/TestMG")
            .build());

    }
}
resources:
  export:
    type: azure-native:costmanagement:Export
    properties:
      definition:
        dataSet:
          configuration:
            columns:
              - Date
              - MeterId
              - ResourceId
              - ResourceLocation
              - Quantity
          granularity: Daily
        timeframe: MonthToDate
        type: ActualCost
      deliveryInfo:
        destination:
          container: exports
          resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182
          rootFolderPath: ad-hoc
      exportName: TestExport
      format: Csv
      identity:
        type: SystemAssigned
      location: centralus
      schedule:
        recurrence: Weekly
        recurrencePeriod:
          from: 2020-06-01T00:00:00Z
          to: 2020-10-31T00:00:00Z
        status: Active
      scope: providers/Microsoft.Management/managementGroups/TestMG

The scope property determines what costs get exported. Setting it to a management group path aggregates data from all subscriptions under that group. The export configuration (schedule, destination, columns) works the same way as subscription-scoped exports, but the system-assigned identity needs permissions across all subscriptions in the management group to read cost data.

Beyond these examples

These snippets focus on specific export-level features: scheduled exports to Azure Storage, scope-based cost aggregation, and system-assigned managed identity. They’re intentionally minimal rather than full cost management solutions.

The examples reference pre-existing infrastructure such as Azure Storage accounts with containers, and billing accounts, departments, enrollment accounts, management groups, subscriptions, or resource groups depending on scope. They focus on configuring the export rather than provisioning the surrounding infrastructure.

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

  • Partitioned data output (partitionData)
  • Custom time ranges (timeframe variations beyond MonthToDate)
  • Column customization beyond the basic set
  • Format options (currently only CSV supported)

These omissions are intentional: the goal is to illustrate how each export feature is wired, not provide drop-in cost management modules. See the Cost Management Export resource reference for all available configuration options.

Let's configure Azure Cost Management Exports

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

Try Pulumi Cloud for FREE

Frequently Asked Questions

Scope & Configuration
What properties can't I change after creating an export?
The scope, exportName, and location properties are immutable. To change any of these, you must delete and recreate the export resource.
What scope types can I use for cost exports?
You can export costs at multiple scope levels: subscription, resource group, billing account, department, enrollment account, management group, billing profile, invoice section, and customer (for partners). Each scope type has a specific format shown in the scope property description.
How do I configure the export destination?
Set the deliveryInfo property with a destination containing the storage account resourceId, container name, and rootFolderPath where exports will be delivered.
Scheduling & Execution
How do I schedule recurring exports?
Configure the schedule property with recurrence (e.g., Weekly), recurrencePeriod specifying from and to dates, and status set to Active.
How can I tell when my next export will run?
The nextRunTimeEstimate output property provides an estimate of the next run time if the export has an active schedule.
Data Format & Partitioning
What export formats are supported?
Currently only Csv format is supported for cost exports.
Can I partition my exported data?
Yes, set partitionData to true to partition exported data by size into a blob directory with a manifest file. This option is currently only available for Microsoft Customer Agreement commerce scopes.
Identity & Security
How do I use managed identity with exports?
Configure the identity property with type set to SystemAssigned and specify the location property for the managed identity. The location is required when using managed identity and cannot be changed after creation.
What is the eTag property used for?
The eTag field handles concurrent update scenarios by determining whether you’re updating the latest version of the resource.
Export Definition
What data can I include in my cost export?
Configure the definition property with a dataSet specifying columns (e.g., Date, MeterId, ResourceId, ResourceLocation, Quantity), granularity (e.g., Daily), timeframe (e.g., MonthToDate), and type (e.g., ActualCost).

Using a different cloud?

Explore monitoring guides for other cloud providers: