Azure Cost Management Cost Management Export

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

azurerm_subscription_cost_management_export (Terraform)

The Cost Management Export in Cost Management can be configured in Terraform with the resource name azurerm_subscription_cost_management_export. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

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).

Parameters

The following arguments are supported:

  • name - (Required) Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.

  • subscription_id - (Required) The id of the subscription on which to create an export.

  • recurrence_type - (Required) How often the requested information will be exported. Valid values include Annually, Daily, Monthly, Weekly.

  • recurrence_period_start_date - (Required) The date the export will start capturing information.

  • recurrence_period_end - (Required) The date the export will stop capturing information.

  • export_data_storage_location - (Required) A export_data_storage_location block as defined below.

  • export_data_options - (Required) A export_data_options block as defined below.

  • active - (Optional) Is the cost management export active? Default is true.


A export_data_storage_location block supports the following:

  • container_id - (Required) The Resource Manager ID of the container where exports will be uploaded.

  • root_folder_path - (Required) The path of the directory where exports will be uploaded.

Note: The Resource Manager ID of a Storage Container is exposed via the resource_manager_id attribute of the azurerm_storage_container resource.


A export_data_options block supports the following:

  • type - (Required) The type of the query.

  • time_frame - (Required) 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.

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Cost Management Export for this Subscription.

Explanation in Terraform Registry

Manages a Cost Management Export for a Subscription.

Microsoft.Subscription/aliases (Azure Resource Manager)

The aliases in Microsoft.Subscription can be configured in Azure Resource Manager with the resource name Microsoft.Subscription/aliases. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
createAlias.json#L18
        "type": "Microsoft.Subscription/aliases",
        "properties": {
          "subscriptionId": "subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05"
        }
      }
    },
eslz.json#L18
            "type": "Microsoft.Subscription/aliases",
            "apiVersion": "2020-09-01",
            "copy": {
                "name": "eslzSubCopy",
                "count": "[length(parameters('subscriptions'))]"
            },
1127.json#L10
            "type": "Microsoft.Subscription/aliases",
            "apiVersion": "2020-09-01",
            "properties": {
                "displayName": "string",
                "workload": "Production",
                "billingScope": "string",
eslz.json#L18
            "type": "Microsoft.Subscription/aliases",
            "apiVersion": "2020-09-01",
            "copy": {
                "name": "eslzSubCopy",
                "count": "[length(parameters('subscriptions'))]"
            },
eslz.json#L18
            "type": "Microsoft.Subscription/aliases",
            "apiVersion": "2020-09-01",
            "copy": {
                "name": "eslzSubCopy",
                "count": "[length(parameters('subscriptions'))]"
            },

Frequently asked questions

What is Azure Cost Management Cost Management Export?

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