Deploying Microsoft Fabric Capacity Using Terraform
Fabric licensing introduces F SKUs for provisioning Fabric capacity on Azure, providing resource isolation and cost control through pay-as-you-go pricing. In this blog, I’ll demonstrate how to deploy Microsoft Fabric Azure Capacity (F SKU) via Terraform.
> Jump directly to the GitHub repo if you want to stop reading.
Deploying Fabric Capacity with Terraform
I’ll leverage the Azure Data Labs Modules repository to simplify the deployment process. The built-in Fabric Terraform module uses the Terraform AzAPI provider.
Prerequisites
Before you begin, make sure you have the following prerequisites in place:
- An Azure subscription
- The Terraform CLI installed
- Git installed
Step 1: Clone the Sample Repository
Clone this repository to your local machine and navigate to /fabric-terraform
folder. This folder uses the Azure Data Labs module to deploy Fabric capacity — see below.
module "fabric_capacity" {
source = "github.com/Azure/azure-data-labs-modules/terraform/fabric/fabric-capacity"
basename = "${var.prefix}${var.postfix}"
resource_group_id = module.resource_group.id
location = var.location
sku = var.sku
admin_email = var.admin_email
}
Step 2: Configure Your Deployment
In the variables.tf
file (*.tfvars omitted for brevity), configure the variables according to your requirements. You'll need to provide information such as location, prefix, postfix and the desired Fabric capacity specifications for sku and admin_email.
Step 3: Initialize and Apply Terraform
Initialize the Terraform configuration by running:
terraform init
Then, apply the configuration using:
terraform apply -auto-approve
Once the deployment is finished, jump to portal.azure.com and you will see the resource group with the Fabric capacity resource. You can clean up the resource group by running terraform destroy
in your terminal.
> Note: you don’t need a F SKU to start with Fabric, you can use a Trial capacity. See Fabric (preview) trial — Microsoft Fabric | Microsoft Learn
For any suggestions or questions, feel free to reach out :)