You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deploymentguide.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,6 +191,42 @@ Edit `infra/main.bicepparam` or set environment variables:
191
191
# var fabricWorkspacePreset = 'none'
192
192
```
193
193
194
+
#### Reusing an Existing Fabric Capacity and Workspace (BYO mode)
195
+
196
+
If you already have a Fabric capacity and workspace, set `byo` mode so the deployment skips creating new ones. The bicepparam variables are driven by environment variables, so the recommended approach is to set them with `azd env set` before running `azd up`:
197
+
198
+
**Step 1 — Set the mode in `infra/main.bicepparam`** (or leave the default `byo` unchanged):
199
+
200
+
```bicep
201
+
// infra/main.bicepparam
202
+
var fabricCapacityPreset = readEnvironmentVariable('fabricCapacityMode', 'byo')
203
+
```
204
+
205
+
The `fabricCapacityMode` env variable controls both capacity and workspace preset (they are tied together). Set it explicitly if the checked-in default has been changed:
206
+
207
+
```powershell
208
+
azd env set fabricCapacityMode byo
209
+
```
210
+
211
+
**Step 2 — Supply the existing resource identifiers:**
212
+
213
+
```powershell
214
+
# ARM resource ID of the existing Fabric capacity
215
+
azd env set fabricCapacityResourceId "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Fabric/capacities/<capacity-name>"
216
+
217
+
# GUID of the existing Fabric workspace (from the workspace URL or Fabric portal)
218
+
azd env set FABRIC_WORKSPACE_ID "<workspace-guid>"
219
+
220
+
# Display name of the existing workspace (used for naming/UX; optional but recommended)
221
+
azd env set FABRIC_WORKSPACE_NAME "<workspace-display-name>"
222
+
```
223
+
224
+
> **How to find the workspace GUID:** Open the workspace in [app.fabric.microsoft.com](https://app.fabric.microsoft.com), copy the URL. The segment after `/groups/` is the workspace GUID (e.g., `https://app.fabric.microsoft.com/groups/e9c7ed61-0cdc-4356-a239-9d49cc755fe0/...` → `e9c7ed61-0cdc-4356-a239-9d49cc755fe0`).
225
+
226
+
> **How to find the capacity resource ID:** In Azure Portal, open the Fabric capacity resource → **Properties** → copy **Resource ID**. It follows the pattern `/subscriptions/.../providers/Microsoft.Fabric/capacities/<name>`.
227
+
228
+
After setting these variables, run `azd up` normally. The deployment will attach to your existing capacity and workspace instead of creating new ones.
> **Deployment flow**: This repo deploys the AI Landing Zone submodule from `submodules/ai-landing-zone/main.bicep` during the preprovision hook. The single source of truth for parameters is `infra/main.bicepparam`.
16
16
17
+
## Fabric Configuration
18
+
19
+
### Modes: create, byo, none
20
+
21
+
| Mode | Description |
22
+
|------|-------------|
23
+
|`create`| Provisions a new Fabric capacity (Bicep) and workspace (postprovision script) |
24
+
|`byo`| Reuses an existing Fabric capacity and workspace — no new resources created |
25
+
|`none`| Disables all Fabric automation; OneLake indexing will be skipped |
26
+
27
+
Both capacity and workspace modes are controlled by the same `fabricCapacityMode` environment variable (they are tied together in `infra/main.bicepparam`).
28
+
29
+
### Setting Mode via azd env
30
+
31
+
The recommended way to configure Fabric mode is with `azd env set` — these values are read directly by `infra/main.bicepparam` at provision time:
32
+
33
+
```powershell
34
+
# Choose one:
35
+
azd env set fabricCapacityMode create # create new capacity + workspace
azd env set fabricCapacityMode none # disable all Fabric automation
38
+
```
39
+
40
+
### Reusing Existing Fabric Resources (BYO)
41
+
42
+
When `fabricCapacityMode` is `byo`, supply the identifiers of your existing resources:
43
+
44
+
```powershell
45
+
# ARM resource ID of the existing Fabric capacity
46
+
azd env set fabricCapacityResourceId "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Fabric/capacities/<capacity-name>"
47
+
48
+
# GUID of the existing Fabric workspace (from the workspace URL)
49
+
azd env set FABRIC_WORKSPACE_ID "<workspace-guid>"
50
+
51
+
# Display name of the existing workspace (optional, used for naming/UX)
52
+
azd env set FABRIC_WORKSPACE_NAME "<workspace-display-name>"
53
+
```
54
+
55
+
> **How to find the workspace GUID:** Open the workspace in [app.fabric.microsoft.com](https://app.fabric.microsoft.com). The URL segment after `/groups/` is the GUID (e.g., `https://app.fabric.microsoft.com/groups/e9c7ed61-0cdc-4356-a239-9d49cc755fe0/...`).
56
+
>
57
+
> **How to find the capacity resource ID:** Azure Portal → Fabric capacity resource → **Properties** → **Resource ID**.
58
+
59
+
You can also set these directly in `infra/main.bicepparam` if you prefer source-controlled values:
> **Note:** Values set via `azd env set` take precedence over hardcoded bicepparam values because `readEnvironmentVariable(...)` is evaluated at deploy time.
70
+
71
+
### Creating New Fabric Resources
72
+
73
+
When `fabricCapacityMode` is `create`, you must provide at least one admin principal:
74
+
75
+
```bicep
76
+
// infra/main.bicepparam
77
+
param fabricCapacityAdmins = ['user@contoso.com']
78
+
param fabricCapacitySku = 'F2' // adjust SKU as needed
79
+
```
80
+
81
+
> **Permission requirement:** The identity running `azd` must have the **Fabric Administrator** role (or Power BI tenant admin) to call the workspace admin APIs used during postprovision.
0 commit comments