Azure Cost Management Export Resource Group

This page shows how to write Terraform for Cost Management Export Resource Group and write them securely.

azurerm_cost_management_export_resource_group (Terraform)

The Export Resource Group in Cost Management can be configured in Terraform with the resource name azurerm_cost_management_export_resource_group. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "azurerm_cost_management_export_resource_group" "main" {

  count = var.cost_management == true ? 1 : 0

  name              = "costmanagement"
  resource_group_id = join("", azurerm_resource_group.main.*.id)
resource "azurerm_cost_management_export_resource_group" "this" {
  active                  =
  name                    =
  recurrence_period_end   = var.recurrence_period_end
  recurrence_period_start = var.recurrence_period_start
  recurrence_type         = var.recurrence_type

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Manages an Azure Cost Management Export for a Resource Group. !> Note: The azurerm_cost_management_export_resource_group resource has been deprecated in favour of the azurerm_resource_group_cost_management_export resource and will be removed in v3.0 of the Azure Provider.

Azure Resource Manager Example

Azure Resource Manager code does not have the related resource.

Frequently asked questions

What is Azure Cost Management Export Resource Group?

Azure Cost Management Export Resource Group is a resource for Cost Management of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Cost Management Export Resource Group?

For Terraform, the holgerson97/terraform-azure-network and niveklabs/azurerm source code examples are useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.