Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1cc2095
feat: automate Fabric Workspace & Capacity creation in workshop mode
Yamini-Microsoft Apr 14, 2026
ba35a0c
Move Fabric workspace creation to scripts pipeline, auto-detect from env
Yamini-Microsoft Apr 20, 2026
7508800
Consolidate Fabric workspace scripts into 02_create_fabric_items.py
Yamini-Microsoft Apr 20, 2026
7ef2925
Normalize print statements: replace emoji with [OK]/[FAIL]/[WARN] tag…
Yamini-Microsoft Apr 20, 2026
42b19e0
Sync FABRIC_WORKSPACE_ID to azd env (.azure/<env>/.env) on create and…
Yamini-Microsoft Apr 21, 2026
9173430
Fix docs: EXISTING_FABRIC_WORKSPACE_ID -> FABRIC_WORKSPACE_ID, update…
Yamini-Microsoft Apr 21, 2026
efc1504
Address PR #343 review comments: add CREATE_FABRIC_WORKSPACE flag, ti…
Yamini-Microsoft Apr 21, 2026
a68ee94
Update docs and restore AZURE_ENV_ONLY_VAL in azure.yaml
Yamini-Microsoft Apr 21, 2026
a14242f
Merge branch 'microsoft:main' into psl-automate-fabric-workshop
Yamini-Microsoft Apr 23, 2026
d00121d
feat: Enhance Fabric setup and configuration documentation; automate …
Yamini-Microsoft Apr 24, 2026
0a966b2
fix: Update documentation for Fabric setup and configuration; improve…
Yamini-Microsoft Apr 24, 2026
b98e90a
refactor: Rename parameters for Fabric capacity and workspace; improv…
Yamini-Microsoft Apr 24, 2026
362afaf
chore: Remove outdated Fabric workspace management documentation
Yamini-Microsoft Apr 24, 2026
75c5795
Address PR #343 review: add createFabricWorkspace param, clean docs
Yamini-Microsoft Apr 27, 2026
ca22a8a
revert 02-setup-fabric.md to original, add only auto-create tip
Yamini-Microsoft Apr 27, 2026
c1380fc
revert unrelated postprovision changes in azure.yaml, keep only predo…
Yamini-Microsoft Apr 27, 2026
c3477a9
change default Fabric capacity SKU from F2 to F8
Yamini-Microsoft Apr 27, 2026
e0ac3f5
fix garbled emoji in commented-out ontology section
Yamini-Microsoft Apr 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ metadata:
template: agentic-applications-for-unified-data-foundation@1.1

hooks:
predown:
windows:
run: |
$createWorkspace = $env:CREATE_FABRIC_WORKSPACE
if ($createWorkspace -eq "true") {
python scripts/02_create_fabric_items.py --cleanup
} else {
Write-Host "Skipping Fabric workspace cleanup (CREATE_FABRIC_WORKSPACE is not true)."
}
shell: pwsh
continueOnError: true
interactive: true
posix:
run: |
if [ "${CREATE_FABRIC_WORKSPACE:-}" = "true" ]; then
python scripts/02_create_fabric_items.py --cleanup
else
echo "Skipping Fabric workspace cleanup (CREATE_FABRIC_WORKSPACE is not true)."
fi
shell: sh
continueOnError: true
interactive: true
postprovision:
windows:
run: |
Expand Down
4 changes: 4 additions & 0 deletions documents/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ By default this template will use the environment name as the prefix to prevent
| `IS_WORKSHOP` | bool | `true` | Enable workshop mode with sample data and simplified configuration. |
| `AZURE_ENV_ONLY` | bool | `false` | Deploy Azure SQL Server instead of Fabric SQL. |
| `DEPLOYING_USER_PRINCIPAL_TYPE` | string | `User` | Principal type of deployer (allowed: `User`, `ServicePrincipal`). |
| `AZURE_FABRIC_CAPACITY_NAME` | string | ` ` | Optional. Name of an existing Fabric capacity to reuse. If empty, a new capacity is auto-created in workshop mode. After deploy, this variable holds the resolved capacity name. |
| `FABRIC_CAPACITY_SKU` | string | `F8` | SKU tier for the Fabric capacity (allowed: `F2` through `F2048`). |
| `CREATE_FABRIC_WORKSPACE` | bool | `false` | Set to `true` to auto-create a Fabric workspace during the build script. Requires `AZURE_FABRIC_CAPACITY_NAME`. |
| `FABRIC_ADMIN_MEMBERS` | array | `[]` | Additional user/service principal object IDs to assign as Fabric Capacity admins. |



Expand Down
56 changes: 56 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,35 @@ param azureEnvOnly bool = false
param useChatHistoryEnabled bool = true
var useChatHistoryEnabledSetting = useChatHistoryEnabled ? 'True' : 'False'

// ========== Fabric Capacity Parameters ========== //
@description('Optional. Name of the Fabric capacity to use. If empty, a new capacity named `fc<solutionSuffix>` is auto-created when isWorkshop is true and azureEnvOnly is false. If set, that capacity is reused and no new capacity is created.')
param azureFabricCapacityName string = ''

@allowed([
'F2'
'F4'
'F8'
'F16'
'F32'
'F64'
'F128'
'F256'
'F512'
'F1024'
'F2048'
])
@description('Optional. SKU tier of the Fabric capacity resource. Defaults to F8.')
param fabricCapacitySku string = 'F8'

@description('Optional. An array of user object IDs or service principal object IDs that will be assigned the Fabric Capacity Admin role.')
param fabricAdminMembers array = []
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be mapped tom main.paramaters.json, else users might need to manaully edit bicep file, also include that in CustominzingAzdParameters.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — added fabricAdminMembers mapping to main.parameters.json as FABRIC_ADMIN_MEMBERS and documented it in CustomizingAzdParameters.md.


@description('Set to true to auto-create a Fabric workspace during the build step. When false, capacity creation is also skipped (an existing workspace implies an existing capacity).')
param createFabricWorkspace bool = false

var useExistingFabricCapacity = !empty(azureFabricCapacityName)
var shouldCreateFabricCapacity = isWorkshop && !azureEnvOnly && createFabricWorkspace && !useExistingFabricCapacity

// If isWorkshop is false, always deploy; if isWorkshop is true, respect deployApp
var shouldDeployApp = !isWorkshop || deployApp

Expand Down Expand Up @@ -161,6 +190,24 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = if (!isWorksh
}
}

// ========== Fabric Capacity (Workshop mode) ========== //
var fabricCapacityResourceName = useExistingFabricCapacity ? azureFabricCapacityName : 'fc${solutionSuffix}'
// Fabric Capacity requires a UPN for user admins; service principals (CI/CD) use objectId.
var fabricCapacityDefaultAdmins = deployer().?userPrincipalName == null
? [deployer().objectId]
: [deployer().userPrincipalName]
var fabricTotalAdminMembers = union(fabricCapacityDefaultAdmins, fabricAdminMembers)

module fabricCapacityModule 'br/public:avm/res/fabric/capacity:0.1.1' = if (shouldCreateFabricCapacity) {
name: take('avm.res.fabric.capacity.${fabricCapacityResourceName}', 64)
params: {
name: fabricCapacityResourceName
location: solutionLocation
skuName: fabricCapacitySku
adminMembers: fabricTotalAdminMembers
}
}

// ========== Managed Identity ========== //
module managedIdentityModule 'deploy_managed_identity.bicep' = {
name: 'deploy_managed_identity'
Expand Down Expand Up @@ -464,3 +511,12 @@ output AZURE_ENV_DEPLOY_APP bool = deployApp

@description('Flag indicating Azure-only mode (no Fabric)')
output AZURE_ENV_ONLY bool = azureEnvOnly

@description('The name of the Fabric capacity resource')
output AZURE_FABRIC_CAPACITY_NAME string = (isWorkshop && !azureEnvOnly && createFabricWorkspace) ? fabricCapacityResourceName : ''

@description('The identities assigned as Fabric Capacity Admin members')
output AZURE_FABRIC_CAPACITY_ADMINISTRATORS array = (isWorkshop && !azureEnvOnly && createFabricWorkspace) ? fabricTotalAdminMembers : []

@description('The unique solution suffix of the deployed resources')
output SOLUTION_SUFFIX string = solutionSuffix
Loading