Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
In ARM and on Azure you can add a OneTimeExport, to do a historical cost export, where you provide some dates as boundaries for you cost export. Unfortunately in azurerm currently, it is not possible to set these dates as they are no arguments in the resource.
So I would propose to use time_period_from and time_period_to as extra arguments, in the export_data_options block. They only are useful, when the timeframe argument is set to 'Custom' (which is already allowed in the current azurerm implementation). So probably we would need some validation there, to make sure they are only able to be used when timeframe is set to 'Custom'
You could also add a timePeriod block with then a "to" and "from" argument, bit similar to AzApi implementation and ARM itself, do not really mind either, but in the same resource here, recurrence_period_start_date and recurrence_period_end_date are also separate arguments (instead of in a block)
Is there an existing issue for this?
Community Note
Description
In ARM and on Azure you can add a OneTimeExport, to do a historical cost export, where you provide some dates as boundaries for you cost export. Unfortunately in azurerm currently, it is not possible to set these dates as they are no arguments in the resource.
So I would propose to use time_period_from and time_period_to as extra arguments, in the export_data_options block. They only are useful, when the timeframe argument is set to 'Custom' (which is already allowed in the current azurerm implementation). So probably we would need some validation there, to make sure they are only able to be used when timeframe is set to 'Custom'
You could also add a timePeriod block with then a "to" and "from" argument, bit similar to AzApi implementation and ARM itself, do not really mind either, but in the same resource here, recurrence_period_start_date and recurrence_period_end_date are also separate arguments (instead of in a block)
New or Affected Resource(s)/Data Source(s)
azurerm_subscription_cost_management_export
Potential Terraform Configuration
References
https://learn.microsoft.com/en-us/azure/templates/microsoft.costmanagement/exports?pivots=deployment-language-arm-template