hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.46k stars 4.54k forks source link

Support for partition_data in azurerm_subscription_cost_management_export #23747

Open drmaciej opened 8 months ago

drmaciej commented 8 months ago

Is there an existing issue for this?

Community Note

Description

File partitioning, as described on https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-export-acm-data?tabs=azure-portal#file-partitioning-for-large-datasets, doesn't seem to be supported in the provider or the CLI (version 2.53.1).

New or Affected Resource(s)/Data Source(s)

azurerm_subscription_cost_management_export

Potential Terraform Configuration

resource "azurerm_subscription_cost_management_export" "example" {
  name                         = "example"
  subscription_id              = data.azurerm_subscription.example.id
  recurrence_type              = "Monthly"
  recurrence_period_start_date = "2020-08-18T00:00:00Z"
  recurrence_period_end_date   = "2020-09-18T00:00:00Z"

  partition_data = true

  export_data_storage_location {
    container_id     = azurerm_storage_container.example.resource_manager_id
    root_folder_path = "/root/updated"
  }

  export_data_options {
    type       = "Usage"
    time_frame = "WeekToDate"
  }
}

References

joshk0 commented 1 month ago

The API version 2023-07-01-preview contains the partitioning option as well as the field that I am personally interested in, dataSet.configuration.dataVersion.

Will we need to revise go-azure-sdk to pull in this API version as well?

joshk0 commented 1 month ago

I've opened hashicorp/pandora#4176 to bring in the requested API version, then I'm not sure how it works to enable that API version inside the terraform provider.