I can give you some pointers to get started. You can integrate Azure Policy with Azure Budget by creating an action group in Azure Monitor that will trigger a Logic App when a budget threshold is reached. The Logic App can then assign the policy definition to the subscription.
To control Azure spending limits, when you create a budget for a subscription or resource group scope, you can configure it to call an action group. The action group can perform various actions when your budget threshold is met.
When the budget is no longer over the threshold, the Logic App can remove the policy definition from the subscription. Here are some of the steps you need to take to create an action group in Azure Monitor:
- Sign into the Azure portal and select All services > Monitor.
- Select Alerts then select Manage actions.
- Select Add an action group from the Action groups area.
- Add and verify the following items: Action group name
Short name
Subscription
Resource group - Within the Add action group pane, add a LogicApp action. Name the action something like Budget-BudgetLA. In the Logic App pane, select the Subscription and the Resource group. Then, select the Logic app that you created earlier in this tutorial.
- Select OK to set the Logic App. Then, select OK in the Add action group pane to create the action group.
You can find more information on how to create an action group in Action group: https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets
Other references:
https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/spending-limit
https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/plan-manage-costs
Hope this helps!
Please accept as answer and upvote if the above information is helpful for the benefit of the community.