Skip to content

Data Source: azurermConsumptionBudgetResourceGroup

Use this data source to access information about an existing Consumption Budget for a specific resource group.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermConsumptionBudgetResourceGroupExample =
  new azurerm.dataAzurermConsumptionBudgetResourceGroup.DataAzurermConsumptionBudgetResourceGroup(
    this,
    "example",
    {
      name: "existing",
      resource_group_id: "${azurerm_resource_group.example.id}",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermConsumptionBudgetResourceGroupExample.id,
});

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of this Consumption Budget.

  • resourceGroupId - (Required) The ID of the subscription.

Attributes Reference

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

  • id - The ID of the Consumption Budget.

  • amount - The total amount of cost to track with the budget.

  • filter - A filter block as defined below.

  • notification - A notification block as defined below.

  • timeGrain - The time covered by a budget.

  • timePeriod - A timePeriod block as defined below.


A filter block exports the following:

  • dimension - A dimension block as defined above.

  • not - A not block as defined below.

  • tag - A tag block as defined below.

-> Note: The order of multiple filter entries is not guaranteed to be consistent by the API.


A not block exports the following:

  • dimension - A dimension block as defined below.

  • tag - A tag block as defined below.


A dimension block exports the following:

  • name - The name of the column to use for the filter.

  • operator - The operator to use for comparison.

  • values - A values block as defined below.


A notification block exports the following:

  • contactEmails - A list of email addresses to send the budget notification to when the threshold is exceeded.

  • contactGroups - A list of Action Group IDs to send the budget notification to when the threshold is exceeded.

  • contactRoles - A list of contact roles to send the budget notification to when the threshold is exceeded.

  • enabled - Whether the notification is enabled.

  • operator - The comparison operator for the notification.

  • threshold - Threshold value associated with the notification.

-> Note: The order of multiple filter entries is not guaranteed to be consistent by the API.


A tag block exports the following:

  • name - The name of the tag used for the filter.

  • operator - The operator used for comparison.

  • values - A list of values for the tag.


A timePeriod block exports the following:

  • endDate - The end date for the budget.

  • startDate - The start date for the budget.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Consumption Budget.