We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages an Azure Cost Management Export for a Resource Group.
!> Note: The azure.costmanagement.ResourceGroupExport resource has been deprecated in favour of the azure.core.ResourceGroupCostManagementExport resource and will be removed in v3.0 of the Azure Provider.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleResourceGroupExport = new Azure.CostManagement.ResourceGroupExport("exampleResourceGroupExport", new Azure.CostManagement.ResourceGroupExportArgs
{
ResourceGroupId = exampleResourceGroup.Id,
RecurrenceType = "Monthly",
RecurrencePeriodStart = "2020-08-18T00:00:00Z",
RecurrencePeriodEnd = "2020-09-18T00:00:00Z",
DeliveryInfo = new Azure.CostManagement.Inputs.ResourceGroupExportDeliveryInfoArgs
{
StorageAccountId = exampleAccount.Id,
ContainerName = "examplecontainer",
RootFolderPath = "/root/updated",
},
Query = new Azure.CostManagement.Inputs.ResourceGroupExportQueryArgs
{
Type = "Usage",
TimeFrame = "WeekToDate",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/costmanagement"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = costmanagement.NewResourceGroupExport(ctx, "exampleResourceGroupExport", &costmanagement.ResourceGroupExportArgs{
ResourceGroupId: exampleResourceGroup.ID(),
RecurrenceType: pulumi.String("Monthly"),
RecurrencePeriodStart: pulumi.String("2020-08-18T00:00:00Z"),
RecurrencePeriodEnd: pulumi.String("2020-09-18T00:00:00Z"),
DeliveryInfo: &costmanagement.ResourceGroupExportDeliveryInfoArgs{
StorageAccountId: exampleAccount.ID(),
ContainerName: pulumi.String("examplecontainer"),
RootFolderPath: pulumi.String("/root/updated"),
},
Query: &costmanagement.ResourceGroupExportQueryArgs{
Type: pulumi.String("Usage"),
TimeFrame: pulumi.String("WeekToDate"),
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleResourceGroupExport = new azure.costmanagement.ResourceGroupExport("exampleResourceGroupExport", {
resourceGroupId: exampleResourceGroup.id,
recurrenceType: "Monthly",
recurrencePeriodStart: "2020-08-18T00:00:00Z",
recurrencePeriodEnd: "2020-09-18T00:00:00Z",
deliveryInfo: {
storageAccountId: exampleAccount.id,
containerName: "examplecontainer",
rootFolderPath: "/root/updated",
},
query: {
type: "Usage",
timeFrame: "WeekToDate",
},
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_resource_group_export = azure.costmanagement.ResourceGroupExport("exampleResourceGroupExport",
resource_group_id=example_resource_group.id,
recurrence_type="Monthly",
recurrence_period_start="2020-08-18T00:00:00Z",
recurrence_period_end="2020-09-18T00:00:00Z",
delivery_info=azure.costmanagement.ResourceGroupExportDeliveryInfoArgs(
storage_account_id=example_account.id,
container_name="examplecontainer",
root_folder_path="/root/updated",
),
query=azure.costmanagement.ResourceGroupExportQueryArgs(
type="Usage",
time_frame="WeekToDate",
))
Example coming soon!
Create ResourceGroupExport Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceGroupExport(name: string, args: ResourceGroupExportArgs, opts?: CustomResourceOptions);@overload
def ResourceGroupExport(resource_name: str,
args: ResourceGroupExportArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceGroupExport(resource_name: str,
opts: Optional[ResourceOptions] = None,
delivery_info: Optional[ResourceGroupExportDeliveryInfoArgs] = None,
query: Optional[ResourceGroupExportQueryArgs] = None,
recurrence_period_end: Optional[str] = None,
recurrence_period_start: Optional[str] = None,
recurrence_type: Optional[str] = None,
resource_group_id: Optional[str] = None,
active: Optional[bool] = None,
name: Optional[str] = None)func NewResourceGroupExport(ctx *Context, name string, args ResourceGroupExportArgs, opts ...ResourceOption) (*ResourceGroupExport, error)public ResourceGroupExport(string name, ResourceGroupExportArgs args, CustomResourceOptions? opts = null)
public ResourceGroupExport(String name, ResourceGroupExportArgs args)
public ResourceGroupExport(String name, ResourceGroupExportArgs args, CustomResourceOptions options)
type: azure:costmanagement:ResourceGroupExport
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ResourceGroupExportArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourceGroupExportArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourceGroupExportArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceGroupExportArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceGroupExportArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var resourceGroupExportResource = new Azure.CostManagement.ResourceGroupExport("resourceGroupExportResource", new()
{
DeliveryInfo = new Azure.CostManagement.Inputs.ResourceGroupExportDeliveryInfoArgs
{
ContainerName = "string",
RootFolderPath = "string",
StorageAccountId = "string",
},
Query = new Azure.CostManagement.Inputs.ResourceGroupExportQueryArgs
{
TimeFrame = "string",
Type = "string",
},
RecurrencePeriodEnd = "string",
RecurrencePeriodStart = "string",
RecurrenceType = "string",
ResourceGroupId = "string",
Active = false,
Name = "string",
});
example, err := costmanagement.NewResourceGroupExport(ctx, "resourceGroupExportResource", &costmanagement.ResourceGroupExportArgs{
DeliveryInfo: &costmanagement.ResourceGroupExportDeliveryInfoArgs{
ContainerName: pulumi.String("string"),
RootFolderPath: pulumi.String("string"),
StorageAccountId: pulumi.String("string"),
},
Query: &costmanagement.ResourceGroupExportQueryArgs{
TimeFrame: pulumi.String("string"),
Type: pulumi.String("string"),
},
RecurrencePeriodEnd: pulumi.String("string"),
RecurrencePeriodStart: pulumi.String("string"),
RecurrenceType: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Active: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var resourceGroupExportResource = new ResourceGroupExport("resourceGroupExportResource", ResourceGroupExportArgs.builder()
.deliveryInfo(ResourceGroupExportDeliveryInfoArgs.builder()
.containerName("string")
.rootFolderPath("string")
.storageAccountId("string")
.build())
.query(ResourceGroupExportQueryArgs.builder()
.timeFrame("string")
.type("string")
.build())
.recurrencePeriodEnd("string")
.recurrencePeriodStart("string")
.recurrenceType("string")
.resourceGroupId("string")
.active(false)
.name("string")
.build());
resource_group_export_resource = azure.costmanagement.ResourceGroupExport("resourceGroupExportResource",
delivery_info={
"container_name": "string",
"root_folder_path": "string",
"storage_account_id": "string",
},
query={
"time_frame": "string",
"type": "string",
},
recurrence_period_end="string",
recurrence_period_start="string",
recurrence_type="string",
resource_group_id="string",
active=False,
name="string")
const resourceGroupExportResource = new azure.costmanagement.ResourceGroupExport("resourceGroupExportResource", {
deliveryInfo: {
containerName: "string",
rootFolderPath: "string",
storageAccountId: "string",
},
query: {
timeFrame: "string",
type: "string",
},
recurrencePeriodEnd: "string",
recurrencePeriodStart: "string",
recurrenceType: "string",
resourceGroupId: "string",
active: false,
name: "string",
});
type: azure:costmanagement:ResourceGroupExport
properties:
active: false
deliveryInfo:
containerName: string
rootFolderPath: string
storageAccountId: string
name: string
query:
timeFrame: string
type: string
recurrencePeriodEnd: string
recurrencePeriodStart: string
recurrenceType: string
resourceGroupId: string
ResourceGroupExport Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ResourceGroupExport resource accepts the following input properties:
- Delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - Query
Resource
Group Export Query - A
queryblock as defined below. - Recurrence
Period stringEnd - The date the export will stop capturing information.
- Recurrence
Period stringStart - The date the export will start capturing information.
- Recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - Resource
Group stringId - The id of the resource group in which to export information.
- Active bool
- Is the cost management export active? Default is
true. - Name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- Delivery
Info ResourceGroup Export Delivery Info Args - A
delivery_infoblock as defined below. - Query
Resource
Group Export Query Args - A
queryblock as defined below. - Recurrence
Period stringEnd - The date the export will stop capturing information.
- Recurrence
Period stringStart - The date the export will start capturing information.
- Recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - Resource
Group stringId - The id of the resource group in which to export information.
- Active bool
- Is the cost management export active? Default is
true. - Name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - query
Resource
Group Export Query - A
queryblock as defined below. - recurrence
Period StringEnd - The date the export will stop capturing information.
- recurrence
Period StringStart - The date the export will start capturing information.
- recurrence
Type String - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group StringId - The id of the resource group in which to export information.
- active Boolean
- Is the cost management export active? Default is
true. - name String
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - query
Resource
Group Export Query - A
queryblock as defined below. - recurrence
Period stringEnd - The date the export will stop capturing information.
- recurrence
Period stringStart - The date the export will start capturing information.
- recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group stringId - The id of the resource group in which to export information.
- active boolean
- Is the cost management export active? Default is
true. - name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- delivery_
info ResourceGroup Export Delivery Info Args - A
delivery_infoblock as defined below. - query
Resource
Group Export Query Args - A
queryblock as defined below. - recurrence_
period_ strend - The date the export will stop capturing information.
- recurrence_
period_ strstart - The date the export will start capturing information.
- recurrence_
type str - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource_
group_ strid - The id of the resource group in which to export information.
- active bool
- Is the cost management export active? Default is
true. - name str
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- delivery
Info Property Map - A
delivery_infoblock as defined below. - query Property Map
- A
queryblock as defined below. - recurrence
Period StringEnd - The date the export will stop capturing information.
- recurrence
Period StringStart - The date the export will start capturing information.
- recurrence
Type String - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group StringId - The id of the resource group in which to export information.
- active Boolean
- Is the cost management export active? Default is
true. - name String
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceGroupExport resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ResourceGroupExport Resource
Get an existing ResourceGroupExport resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ResourceGroupExportState, opts?: CustomResourceOptions): ResourceGroupExport@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
delivery_info: Optional[ResourceGroupExportDeliveryInfoArgs] = None,
name: Optional[str] = None,
query: Optional[ResourceGroupExportQueryArgs] = None,
recurrence_period_end: Optional[str] = None,
recurrence_period_start: Optional[str] = None,
recurrence_type: Optional[str] = None,
resource_group_id: Optional[str] = None) -> ResourceGroupExportfunc GetResourceGroupExport(ctx *Context, name string, id IDInput, state *ResourceGroupExportState, opts ...ResourceOption) (*ResourceGroupExport, error)public static ResourceGroupExport Get(string name, Input<string> id, ResourceGroupExportState? state, CustomResourceOptions? opts = null)public static ResourceGroupExport get(String name, Output<String> id, ResourceGroupExportState state, CustomResourceOptions options)resources: _: type: azure:costmanagement:ResourceGroupExport get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Active bool
- Is the cost management export active? Default is
true. - Delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - Name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- Query
Resource
Group Export Query - A
queryblock as defined below. - Recurrence
Period stringEnd - The date the export will stop capturing information.
- Recurrence
Period stringStart - The date the export will start capturing information.
- Recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - Resource
Group stringId - The id of the resource group in which to export information.
- Active bool
- Is the cost management export active? Default is
true. - Delivery
Info ResourceGroup Export Delivery Info Args - A
delivery_infoblock as defined below. - Name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- Query
Resource
Group Export Query Args - A
queryblock as defined below. - Recurrence
Period stringEnd - The date the export will stop capturing information.
- Recurrence
Period stringStart - The date the export will start capturing information.
- Recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - Resource
Group stringId - The id of the resource group in which to export information.
- active Boolean
- Is the cost management export active? Default is
true. - delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - name String
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- query
Resource
Group Export Query - A
queryblock as defined below. - recurrence
Period StringEnd - The date the export will stop capturing information.
- recurrence
Period StringStart - The date the export will start capturing information.
- recurrence
Type String - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group StringId - The id of the resource group in which to export information.
- active boolean
- Is the cost management export active? Default is
true. - delivery
Info ResourceGroup Export Delivery Info - A
delivery_infoblock as defined below. - name string
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- query
Resource
Group Export Query - A
queryblock as defined below. - recurrence
Period stringEnd - The date the export will stop capturing information.
- recurrence
Period stringStart - The date the export will start capturing information.
- recurrence
Type string - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group stringId - The id of the resource group in which to export information.
- active bool
- Is the cost management export active? Default is
true. - delivery_
info ResourceGroup Export Delivery Info Args - A
delivery_infoblock as defined below. - name str
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- query
Resource
Group Export Query Args - A
queryblock as defined below. - recurrence_
period_ strend - The date the export will stop capturing information.
- recurrence_
period_ strstart - The date the export will start capturing information.
- recurrence_
type str - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource_
group_ strid - The id of the resource group in which to export information.
- active Boolean
- Is the cost management export active? Default is
true. - delivery
Info Property Map - A
delivery_infoblock as defined below. - name String
- Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
- query Property Map
- A
queryblock as defined below. - recurrence
Period StringEnd - The date the export will stop capturing information.
- recurrence
Period StringStart - The date the export will start capturing information.
- recurrence
Type String - How often the requested information will be exported. Valid values include
Annually,Daily,Monthly,Weekly. - resource
Group StringId - The id of the resource group in which to export information.
Supporting Types
ResourceGroupExportDeliveryInfo, ResourceGroupExportDeliveryInfoArgs
- Container
Name string - The name of the container where exports will be uploaded.
- Root
Folder stringPath - The path of the directory where exports will be uploaded.
- Storage
Account stringId - The storage account id where exports will be delivered.
- Container
Name string - The name of the container where exports will be uploaded.
- Root
Folder stringPath - The path of the directory where exports will be uploaded.
- Storage
Account stringId - The storage account id where exports will be delivered.
- container
Name String - The name of the container where exports will be uploaded.
- root
Folder StringPath - The path of the directory where exports will be uploaded.
- storage
Account StringId - The storage account id where exports will be delivered.
- container
Name string - The name of the container where exports will be uploaded.
- root
Folder stringPath - The path of the directory where exports will be uploaded.
- storage
Account stringId - The storage account id where exports will be delivered.
- container_
name str - The name of the container where exports will be uploaded.
- root_
folder_ strpath - The path of the directory where exports will be uploaded.
- storage_
account_ strid - The storage account id where exports will be delivered.
- container
Name String - The name of the container where exports will be uploaded.
- root
Folder StringPath - The path of the directory where exports will be uploaded.
- storage
Account StringId - The storage account id where exports will be delivered.
ResourceGroupExportQuery, ResourceGroupExportQueryArgs
- time_
frame str - The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include:
WeekToDate,MonthToDate,BillingMonthToDate,TheLastWeek,TheLastMonth,TheLastBillingMonth,Custom. - type str
- The type of the query.
Import
Cost Management Export for a Resource Group can be imported using the resource id, e.g.
$ pulumi import azure:costmanagement/resourceGroupExport:ResourceGroupExport example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.CostManagement/exports/example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi