Danger
A budget in Azure is not a hard limit. This means that the costs of a subscription can exceed the budget. It depends on the configuration of the budget whether automatic actions will follow (see the chapter Automation)
Default Budget for a Subscription
Note
To change the budget, you must have the role Unibe-Subscription-Owner (mg-unibe).
When creating a Subscription, a default budget of 200 CHF is defined. This should be adjusted according to your own needs.
- You can find the budget in the left menu of the Subscription detail page under
Cost ManagementandBudgets. - Click on the budget named
default. - Click on
Edit budgetin the top menu bar. - Under Budget Amount you can define an amount at which the alert starts. Enter the desired amount there. Click on
Next. - Under
Alert conditionsyou can add your own conditions for when an alert should occur. - Under
Alert recipients (email)you can add additional email addresses that should be notified when the alert is triggered. - Click
Saveto finish.
Control Mechanisms
The IT Services of the University of Bern has also defined a budget per Subscription. This has a limit of 1000 CHF and notifies the Cloud Team. They would then analyze the costs for the respective Subscription and notify the owners of the Subscription if necessary.
Setting Budgets for Individual Resources
In the above example, a budget was defined for a Subscription and adjusted according to your own needs. However, a budget can not only be defined for a Subscription. It is also possible to define a budget for Resource Groups. For this, see the instructions here.
Automation
In the cases discussed, a budget was mainly created to notify a person if it was or will be exceeded. However, you can also create a budget that can automatically execute individual actions. The budget itself is only the trigger, the actual automation can be implemented in different ways:
- You can run a Runbook in an Automation Account. You can find instructions here on how to automatically shut down a Virtual Machine when a budget is exceeded.
- You can implement automation via a Logic App.
- You can automatically call an Azure Function.
Next Steps
The Subscription is now ready. You can now start creating your own resources. In the article Resources, a website will be created and published.