In the previous blog post, I explained Microsoft Fabric capacities, shedding light on diverse capacity options and how they influence data projects. We delved into Capacity Units (CUs), pricing nuances, and practical cost control methods, including manually scaling and pausing Fabric capacity. Now, we’re taking the next step in our Microsoft Fabric journey by exploring the possibility of automating the pause and resume process. In this blog post, we’ll unlock the secrets to seamlessly managing your Fabric Capacity with automation that helps us save time and resources while optimising the usage of data and analytics workloads.
Right off the bat, this is a rather long blog, so I added a bonus section at the end for those who are reading from the beginning to the end. With that, let’s dive in!
The Problem
As we have learned in the previous blog post, one way to manage our Fabric capacity costs is to pause the capacity while not in use and resume it again when needed. While this can help with cost management, as it is a manual process, it is prone to human error, which makes it impractical in the long run.
The Solution
A more practical solution is to automate a daily process to pause and resume our Fabric capacity automatically. This can be done by running Azure Management APIs. Depending on our expertise, there are several ways to achieve the goal, such as running APIs on running the APIs via PowerShell (scheduling the runs separately), running the APIs via CloudShell, creating a flow in Power Automate, or creating the workflow in Azure Logic Apps. I prefer the latter, so this blog post explains the method.
I also explain the same scenario on my YouTube channel. Here is the video:
Automating Pause and Resume Fabric Capacity with Azure Logic Apps
Here is the scenario: we are going to create an Azure Logic Apps workflow that automatically does the following:
- Check the time of the day
- If it is between 8 am to 4 pm:
- Check the status of the Fabric capacity
- If the capacity is paused, then resume it, otherwise do nothing
- If it is after 4 pm and before 8 am:
- Check the status of the Fabric capacity
- If the capacity is resumed, then pause it, otherwise do nothing
Follow these steps to implement the scenario in Azure Logic Apps:
- Login to Azure Portal and search for “Logic App“
- Click the Logic App service
This navigates us to the Logic App service. If you currently have existing Logic Apps workflows, they will appear here.
Continue reading “Microsoft Fabric: Capacity Cost Management Part 2, Automate Pause/Resume Capacity with Azure Logic Apps”