Skip to main content
To install and authenticate the provider, see Terraform setup.
Overwrite previous reportsSet dataOverwriteBehavior = "OverwritePreviousReport" on both exports. In the Azure portal this is the Overwrite data checkbox, enabled by default on new exports.If you omit the field, the API applies CreateNewReport and each daily run creates a new folder. A datasource references one ActualCost path and one AmortizedCost path. Prefix lists and wildcards are not supported.Point actuals_path and amortized_path at the export root folders (actuals/<export-name> and amortized/<export-name> in the template). With overwrite enabled, each month directory holds only the latest run.
If an existing export already created one folder per day, add the overwrite setting, then delete the leftover run folders.
Choose the Azure scopeThe example above creates the export on a subscription. The same resource works at other Azure scopes. Change parent_id on both azapi_resource blocks:
If you move the export to another scope, update actuals_path and amortized_path to the new folder names. Costory still accepts only one prefix per cost type.Backfilling historical dataAzure exports only produce data going forward. To import past months, the module triggers one-off export runs via azapi_resource_action. Two variables control this:Run the backfill as a separate apply:
This calls the Azure exports/run API for both the actuals and amortized exports, one calendar month at a time. Azure writes the Parquet files to the same container and Costory picks them up on the next sync. Set run_backfill back to false afterward to avoid re-triggering on future applies.
Last modified on November 12, 2026