Skip to content

Latest commit

 

History

History
92 lines (68 loc) · 3.39 KB

File metadata and controls

92 lines (68 loc) · 3.39 KB

Terraform Template - Microsoft Fabric (Capacity)

Costa Rica

GitHub brown9804

Last updated: 2026-02-17


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 = true and let Terraform resolve the current user UPN.
  • Option B: set admin_members explicitly to one or more UPNs like user@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 = true and omit admin_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.
image image image

File Descriptions

  • 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.

Variables

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" }

Usage

  1. Authenticate:

    az login
    az account show
    # If needed:
    az account set --subscription "<subscription-id-or-name>"
  2. Initialize:

    terraform init -upgrade
  3. Validate and plan:

    terraform validate
    terraform plan
  4. Apply:

    terraform apply -auto-approve
Total views

Refresh Date: 2026-02-18