Costa Rica
Last updated: 2026-02-16
This template contains Terraform configurations to create a Microsoft Fabric capacity in Azure.
Important
Fabric capacity creation requires at least one admin member.
- Option A (recommended): set
use_current_user_as_admin = trueand let Terraform resolve the current user UPN. - Option B: set
admin_membersexplicitly to one or more UPNs likeuser@domain.com. To avoid committing identities, prefer environment variables: - PowerShell:
$env:TF_VAR_admin_members='["user@domain.com"]' - PowerShell (auto): keep
use_current_user_as_admin = trueand omitadmin_members.
Note
- The Fabric capacity resource is created via the AzAPI provider using the ARM resource type
Microsoft.Fabric/capacities@2023-11-01. - The Resource Group is created via AzAPI (idempotent ARM PUT) to align with other templates in this repository.
- main.tf: Creates the Resource Group and the Fabric capacity (AzAPI).
- variables.tf: Defines the input variables used in the Terraform configuration.
- provider.tf: Configures the AzureRM + AzAPI providers.
- terraform.tfvars: Example values for the variables defined in
variables.tf. - output.tf: Defines outputs such as Fabric capacity resource ID.
| Variable Name | Description | Type | Example Value |
|---|---|---|---|
resource_group_name |
Resource Group name to create/deploy into. | string | "rg-analytics-dev-fabric" |
location |
Azure region for the deployment. | string | "eastus" |
capacity_name |
Base capacity name. If suffix enabled, final is <base>-<suffix>. |
string | "fabric-capacity-dev" |
use_current_user_as_admin |
Auto-resolve current user as admin when admin_members is empty. |
bool | true |
admin_members |
Optional explicit Fabric capacity admins (UPNs). Overrides auto mode. | list(string) | [] |
sku_name |
Capacity SKU (for example F2, F4, F8, ...). |
string | "F2" |
sku_tier |
Capacity SKU tier. | string | "Fabric" |
append_random_suffix |
Append a random suffix to avoid collisions. | bool | true |
random_suffix_length |
Length of the random suffix when enabled. | number | 6 |
tags |
Tags applied to resources. | map(string) | { "env": "dev" } |
-
Authenticate:
az login az account show # If needed: az account set --subscription "<subscription-id-or-name>"
-
Initialize:
terraform init -upgrade
-
Validate and plan:
terraform validate terraform plan
-
Apply:
terraform apply -auto-approve