|
| 1 | +--- |
| 2 | +title: Quickstart - Create a budget with an Azure Resource Manager template |
| 3 | +description: Quickstart showing how to Create a budget with an Azure Resource Manager template. |
| 4 | +author: bandersmsft |
| 5 | +ms.author: banders |
| 6 | +tags: azure-resource-manager |
| 7 | +ms.service: cost-management-billing |
| 8 | +ms.topic: quickstart |
| 9 | +ms.date: 04/22/2020 |
| 10 | +ms.custom: subject-armqs |
| 11 | +--- |
| 12 | + |
| 13 | +# Quickstart: Create a budget with an Azure Resource Manager template |
| 14 | + |
| 15 | +Budgets in Cost Management help you plan for and drive organizational accountability. With budgets, you can account for the Azure services you consume or subscribe to during a specific period. They help you inform others about their spending to proactively manage costs, and to monitor how spending progresses over time. When the budget thresholds you've created are exceeded, notifications are triggered. None of your resources are affected and your consumption isn't stopped. You can use budgets to compare and track spending as you analyze costs. This quickstart shows you how to create a budget using a Resource Manager template. |
| 16 | + |
| 17 | +[!INCLUDE [About Azure Resource Manager](../../../includes/resource-manager-quickstart-introduction.md)] |
| 18 | + |
| 19 | +## Prerequisites |
| 20 | + |
| 21 | +The Azure Resource Manager template only supports Azure subscriptions for Enterprise Agreements (EA). Other subscription types aren't supported by the template. |
| 22 | + |
| 23 | +To create and manage budgets, you must have contributor permission. You can create individual budgets for EA subscriptions and resource groups. However, you can't create budgets for EA billing accounts. For Azure EA subscriptions, you must have read access to view budgets. |
| 24 | + |
| 25 | +After a budget is created, you need at least read access for your Azure account to view budgets. |
| 26 | + |
| 27 | +If you have a new subscription, you can't immediately create a budget or use other Cost Management features. It might take up to 48 hours before you can use all Cost Management features. |
| 28 | + |
| 29 | +The following Azure permissions, or scopes, are supported per subscription for budgets by user and group. For more information about scopes, see [Understand and work with scopes](understand-work-scopes.md). |
| 30 | + |
| 31 | +- Owner – Can create, modify, or delete budgets for a subscription. |
| 32 | +- Contributor and Cost Management contributor – Can create, modify, or delete their own budgets. Can modify the budget amount for budgets created by others. |
| 33 | +- Reader and Cost Management reader – Can view budgets that they have permission to. |
| 34 | + |
| 35 | +For more information about assigning permission to Cost Management data, see [Assign access to Cost Management data](assign-access-acm-data.md). |
| 36 | + |
| 37 | +## Review the template |
| 38 | + |
| 39 | +The template used in this quickstart is from [Azure Quickstart templates](https://azure.microsoft.com/resources/templates/create-budget). |
| 40 | + |
| 41 | +:::code language="json" source="~/quickstart-templates/create-budget/azuredeploy.json"::: |
| 42 | + |
| 43 | +One Azure resource is defined in the template: |
| 44 | + |
| 45 | +* [Microsoft.Consumption/budgets](/azure/templates/microsoft.consumption/budgets): Create an Azure budget. |
| 46 | + |
| 47 | +## Deploy the template |
| 48 | + |
| 49 | +1. Select the following image to sign in to Azure and open a template. The template creates a budget. |
| 50 | + |
| 51 | + <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fcreate-budget%2Fazuredeploy.json"><img src="./media/quick-create-budget-template/deploy-to-azure.png" alt="deploy to azure"/></a> |
| 52 | + |
| 53 | +2. Select or enter the following values. |
| 54 | + |
| 55 | + [](./media/quick-create-budget-template/create-budget-using-template-portal.png#lightbox) |
| 56 | + |
| 57 | + * **Subscription**: select an Azure subscription. |
| 58 | + * **Resource group**: select **Create new** and enter a unique name for the resource group and then click **OK**, or select an existing resource group. |
| 59 | + * **Location**: select a location. For example, **Central US**. |
| 60 | + * **Budget Name**: enter a name for the budget. It should be unique within a resource group. Only alphanumeric, underscore, and hyphen characters are allowed. |
| 61 | + * **Amount**: enter the total amount of cost or usage to track with the budget. |
| 62 | + * **Budget Category**: select the category of the budget, whether the budget tracks **Cost** or **Usage**. |
| 63 | + * **Time Grain**: enter the time covered by a budget. Allowed values are Monthly, Quarterly, or Annually. The budget resets at the end of the time grain. |
| 64 | + * **Start Date**: enter the start date with the first day of the month in YYYY-MM-DD format. A future start date shouldn't be more than three months from today. You can specify a past start date with the Time Grain period. |
| 65 | + * **End Date**: enter the end date for the budget in YYYY-MM-DD format. If not provided, the default is set to 10 years from the start date. |
| 66 | + * **Operator**: select a comparison operator. Possible values are EqualTo, GreaterThan, or GreaterThanOrEqualTo. |
| 67 | + * **Threshold**: enter a threshold value for the notification. A notification is sent when the cost exceeds the threshold. It's always percent and has to be between 0 and 1000. |
| 68 | + * **Contact Emails ** enter a list of email addresses to send the budget notification to when the threshold is exceeded. Expected format is `["[email protected]","[email protected]"]`. |
| 69 | + * **Contact Roles** enter the list of contact roles to send the budget notification to when the threshold is exceeded. Default values are Owner, Contributor, and Reader. Expected format is `["Owner","Contributor","Reader"]`. |
| 70 | + * **Contact Groups** enter a list of action groups to send the budget notification to when the threshold is exceeded. It accepts array of strings. Expected format is `["Action Group Name1","Action Group Name2"]`. If don't want to use action groups, enter `[]`. |
| 71 | + * **Resources Filter** enter a list of filters for resources. Expected format is `["Resource Filter Name1","Resource Filter Name2"]`. If you don't want to apply a filter, enter `[]`. If you enter a resources filter, you must also enter **meters filters** values. |
| 72 | + * **Meters Filter** enter a list of filters on meters, mandatory for budgets with the **Usage** budget category. Expected format is `["Meter Filter Name1","Meter Filter Name2"]`. If you didn't enter a **resources filter**, enter `[]`. |
| 73 | + * **I agree to the terms and conditions state above**: Select. |
| 74 | + |
| 75 | +3. Select **Purchase**. After the budget is successfully deployed, you get a notification: |
| 76 | + |
| 77 | +  |
| 78 | + |
| 79 | +The Azure portal is used to deploy the template. In addition to the Azure portal, you can also use Azure PowerShell, Azure CLI, and REST API. To learn about other deployment templates, see [Deploy templates](../../azure-resource-manager/templates/deploy-powershell.md). |
| 80 | + |
| 81 | +## Validate the deployment |
| 82 | + |
| 83 | +You can use the Azure portal to verify that the budget is created by navigating to **Cost Management + Billing** > select a scope > **Budgets**. Or, use the following Azure CLI or Azure PowerShell scripts to view the budget. |
| 84 | + |
| 85 | +# [CLI](#tab/CLI) |
| 86 | + |
| 87 | +```azurecli-interactive |
| 88 | +az consumption budget list |
| 89 | +``` |
| 90 | + |
| 91 | +# [PowerShell](#tab/PowerShell) |
| 92 | + |
| 93 | +```azurepowershell-interactive |
| 94 | +Get-AzConsumptionBudget |
| 95 | +``` |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## Next steps |
| 100 | + |
| 101 | +In this quickstart, you created an Azure budget the deployment. To learn more about Azure Cost Management and Billing and Azure Resource Manager, continue on to the articles below. |
| 102 | + |
| 103 | +- Read the [Cost Management and Billing](../cost-management-billing-overview.md) overview |
| 104 | +- [Create budgets](tutorial-acm-create-budgets.md) in the Azure portal |
| 105 | +- Learn more about [Azure Resource Manager](../../azure-resource-manager/management/overview.md) |
0 commit comments