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: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,18 @@ If you only want a small Foundry demo or a basic RAG sample, this repo is heavie
42
42
43
43
For the first attempt, the lowest-risk path is to keep Fabric and Purview disabled unless you already have their prerequisites in place.
44
44
45
+
> **Important:** The checked-in values in `infra/main.bicepparam` are an opinionated end-to-end provisioning path for this accelerator, not a neutral baseline for every scenario. They are useful for demonstrating the full stack and the automation flow, but they might enable services, networking, mirroring behavior, or governance hooks that you do not want in your target deployment.
46
+
>
47
+
> Before running `azd up`, review the active settings across:
48
+
> - repo wrapper parameters in `infra/main.bicepparam`
49
+
> - AI Landing Zone feature flags and topology implied by the preprovision deployment
50
+
> - postprovision automation expectations in `azure.yaml`
51
+
> - supporting server-specific settings such as PostgreSQL networking, mirroring mode, and Fabric/Purview inputs
52
+
>
53
+
> Treat the current defaults as the repo's "golden path" for a broad end-to-end demo and validation flow. Adjust them deliberately if you want a smaller, cheaper, or less integrated deployment.
54
+
55
+
> **Security note (PostgreSQL mirroring):** The mirroring prep script must run from a VNet-connected host when Key Vault and PostgreSQL are private. If you need a non-VNet demo, temporarily open access to both Key Vault and PostgreSQL, run the script, then lock them down. See [docs/post_deployment_steps.md](./docs/post_deployment_steps.md) for the manual steps, including the temporary Key Vault override.
56
+
45
57
### Dependency Map
46
58
47
59
| Area | Required to enable it | If missing |
@@ -98,7 +110,7 @@ Follow the deployment guide to deploy this solution to your own Azure subscripti
98
110
99
111
1. Run `azd auth login` and confirm the target subscription with `az account show`
100
112
2. Create a new environment and set`AZURE_SUBSCRIPTION_ID` and `AZURE_LOCATION`
101
-
3. Review `infra/main.bicepparam`, especially `principalId`, `aiSearchAdditionalAccessObjectIds`, `fabricCapacityPreset`, `fabricWorkspacePreset`, `fabricCapacityAdmins`, `purviewAccountResourceId`, `networkIsolation`, and `postgreSqlNetworkIsolation`
113
+
3. Review `infra/main.bicepparam`, especially `principalId`, `aiSearchAdditionalAccessObjectIds`, `fabricCapacityPreset`, `fabricWorkspacePreset`, `fabricCapacityAdmins`, `purviewAccountResourceId`, `networkIsolation`, `postgreSqlNetworkIsolation`, and `postgreSqlAllowAzureServices`
102
114
4. Run `azd up`
103
115
5. Follow [docs/post_deployment_steps.md](./docs/post_deployment_steps.md) to verify the deployment
Copy file name to clipboardExpand all lines: docs/DeploymentGuide.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,18 @@ azd env set AZURE_LOCATION eastus2
144
144
145
145
### Step 3: Configure Parameters
146
146
147
+
> **Important:** The values currently checked into `infra/main.bicepparam` represent an opinionated end-to-end path for provisioning this accelerator, including AI Landing Zone infrastructure, Fabric-related automation, PostgreSQL options, and postprovision hooks. They are not guaranteed to be the right settings for every deployment.
148
+
>
149
+
> Before you run `azd up`, verify the feature flags and automation inputs you are inheriting from:
150
+
> -`infra/main.bicepparam`
151
+
> - the AI Landing Zone submodule deployment that runs in preprovision
152
+
> -`azure.yaml` postprovision hooks and their prerequisites
153
+
> - service-specific settings such as Fabric, Purview, network isolation, PostgreSQL mirroring mode, and Azure-services firewall access
154
+
>
155
+
> If your goal is not the full end-to-end accelerator flow, change the flags first instead of treating the current defaults as universally safe.
156
+
157
+
> **Security note (PostgreSQL mirroring):** The mirroring prep script requires VNet access when Key Vault and PostgreSQL are private. If you need to demo mirroring end-to-end from a non-VNet machine, temporarily open access to both Key Vault and PostgreSQL before running the script and lock them down afterward. See [docs/postgresql_mirroring.md](./postgresql_mirroring.md).
When `postgreSqlNetworkIsolation` is `false`, PostgreSQL uses public access and does not create private endpoints or private DNS resources.
455
456
457
+
`postgreSqlAllowAzureServices` controls whether deployment also creates the PostgreSQL firewall rule that allows Azure services to connect (`0.0.0.0` to `0.0.0.0`). This is the declarative equivalent of the Azure portal **Allow public access from any Azure service within Azure to this server** setting.
- Private/gateway path: `postgreSqlNetworkIsolation = true` and `postgreSqlAllowAzureServices = false`
463
+
456
464
`postgreSqlAuthConfig` should remain set to both authentication modes enabled if you plan to configure Fabric mirroring after deployment. This ensures the server is created with password authentication available for the `fabric_user` connection instead of relying on a later hook to change the auth mode.
457
465
458
466
`postgreSqlMirrorConnectionMode` controls which credential the manual Fabric PostgreSQL connection should use after deployment:
Copy file name to clipboardExpand all lines: docs/post_deployment_steps.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,15 @@ Use these short steps to verify the PostgreSQL mirroring follow-up flow. For ful
53
53
54
54
Mirroring in the current branch is a separate follow-up activity. Fabric connection creation and mirrored database creation are not part of `azd up`.
55
55
56
+
> **Security step (required for manual mirroring):** The mirroring prep script must run from a VNet-connected host when Key Vault and PostgreSQL are private. If you want to demo mirroring end-to-end from a non-VNet machine, temporarily open access to both Key Vault and PostgreSQL before running the script, then lock them down afterward.
57
+
58
+
If you must run the mirroring prep from a non-VNet host, set the temporary Key Vault override before you run the script:
Copy file name to clipboardExpand all lines: docs/postgresql_mirroring.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,16 @@
2
2
3
3
This guide explains how to complete PostgreSQL mirroring in Microsoft Fabric after deployment.
4
4
5
+
> **Security-critical note:** The mirroring prep script must run from a VNet-connected host when Key Vault and PostgreSQL are private. If you want to demo the full end-to-end mirroring flow from a non-VNet machine, you must temporarily open access to both Key Vault and PostgreSQL before running the script, then re-lock them afterward. Treat this as a deliberate security step, not a default configuration.
6
+
5
7
Mirroring automation in the current branch is set for PostgreSQL deployments where `postgreSqlNetworkIsolation = false`.
6
8
9
+
For the public/manual path, this repo now supports a declarative firewall toggle through `postgreSqlAllowAzureServices`.
10
+
11
+
-`postgreSqlNetworkIsolation = false` makes PostgreSQL publicly reachable.
12
+
-`postgreSqlAllowAzureServices = true` creates the PostgreSQL `AllowAzureServices` firewall rule (`0.0.0.0` to `0.0.0.0`), which is the deployment equivalent of the Azure portal **Allow public access from any Azure service within Azure to this server** setting.
13
+
- That combination is the recommended configuration when you want `azd up` to leave PostgreSQL ready for a manual Fabric connection without using a VNet gateway.
14
+
7
15
If you want full PostgreSQL isolation, the database deployment can still succeed, but end-to-end Fabric mirroring moves to the Fabric VNet gateway path.
8
16
9
17
If you are not changing the network approach right now, there are only two valid post-deployment outcomes:
@@ -26,13 +34,21 @@ Choose one path up front:
26
34
27
35
Use this path when the PostgreSQL server has `publicNetworkAccess=Enabled`. In this repo, that corresponds to `postgreSqlNetworkIsolation = false`.
28
36
37
+
Recommended deployment settings for this path:
38
+
39
+
```bicep-params
40
+
param postgreSqlNetworkIsolation = false
41
+
param postgreSqlAllowAzureServices = true
42
+
```
43
+
29
44
1. In Azure Portal, open the PostgreSQL Flexible Server.
30
45
2. Open **Fabric Mirroring** on the server and let the portal prepare the server-side prerequisites.
31
46
- Microsoft documentation explicitly calls out this page as the path that automates the server-side mirroring prerequisites.
32
47
- This overlaps with what `prepare_postgresql_for_mirroring.ps1` is trying to automate.
33
48
- It does **not** create the Fabric connection object or the mirrored database item in the Fabric workspace.
34
49
3. In **Networking**, make sure Fabric can reach the server.
35
-
- Shortest path: add the `0.0.0.0` firewall rule to allow Azure services.
50
+
- If `postgreSqlAllowAzureServices = true`, deployment should already have created the Azure-services firewall rule.
51
+
- If it is not enabled in deployment, add the `0.0.0.0` firewall rule manually.
36
52
- If you only need to read the password secret yourself, temporarily add only your client IP to Key Vault, retrieve the secret, then remove the IP again.
37
53
4. In Fabric, create a new **Mirrored Azure Database for PostgreSQL** item.
38
54
5. Use these deployment values instead of hardcoding names:
@@ -134,6 +150,7 @@ If preflight fails, fix the runner first instead of continuing into SQL prep or
134
150
What is automated today:
135
151
136
152
- PostgreSQL server deployment during `azd up`.
153
+
- Optional PostgreSQL Azure-services firewall rule creation during `azd up` when `postgreSqlAllowAzureServices = true` and PostgreSQL public access is enabled.
137
154
- PostgreSQL mirroring prep during `azd up` postprovision (server parameters, auth mode, mirroring role/grants, and seed table).
138
155
- Manual or follow-up Fabric connection creation for PostgreSQL mirroring.
139
156
- Manual or follow-up mirror creation after the Fabric connection is resolved.
@@ -149,6 +166,7 @@ The Fabric mirroring API requires a Fabric "connection" object that stores the P
149
166
- PostgreSQL authentication mode is **PostgreSQL and Microsoft Entra authentication** (password auth enabled).
150
167
- You have access to the Key Vault that stores the PostgreSQL secrets.
151
168
- Decide which connection mode you are using: `fabricUser` (default) or `admin` via `postgreSqlMirrorConnectionMode`.
169
+
- If you are using the public/manual path, prefer `postgreSqlAllowAzureServices = true` so Fabric can reach PostgreSQL without a VNet gateway.
Re-run it manually only if you need to repair or reapply the PostgreSQL mirroring readiness settings.
174
192
193
+
> **Security step (manual demo path):** If you are not running from a VNet-connected host, temporarily enable Key Vault access and PostgreSQL firewall access for your client before running the script. Restore the locked-down settings immediately after.
194
+
195
+
If you need the script to temporarily enable Key Vault public access while it runs, set:
@description('Allow connections from Azure services to the PostgreSQL server when public access is enabled. This creates the 0.0.0.0 firewall rule equivalent to the portal Allow Azure services setting.')
222
+
parampostgreSqlAllowAzureServicesbool = false
223
+
221
224
@description('Create and link the PostgreSQL private DNS zone to the VNet.')
0 commit comments