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
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,9 +204,9 @@ When Deployment is complete:
204
204
1. Run the post-deployment setup script to configure the Function App client key and create PostgreSQL tables (if applicable). Open [Azure Cloud Shell](https://shell.azure.com) (Bash) and run:
Copy file name to clipboardExpand all lines: docs/AVMPostDeploymentGuide.md
+3-16Lines changed: 3 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,26 +12,13 @@ Ensure you have a **Deployed Infrastructure** - A successful Chat with your data
12
12
13
13
## Post Deployment Steps
14
14
15
-
### Step 1: Run Post-Deployment Setup Script
16
-
17
-
Run the post-deployment script to configure the Function App client key and create PostgreSQL tables (if applicable). Open [Azure Cloud Shell](https://shell.azure.com) (Bash) and run:
> **Note:** The script auto-discovers all resources in the resource group. It handles private networking (WAF) deployments by temporarily enabling public access, performing the setup, then restoring the original state.
27
-
28
-
### Step 2: Configure App Authentication
15
+
### Step 1: Configure App Authentication
29
16
30
17
1. After deployment is complete, navigate to your Azure App Service in the Azure portal
31
18
2. Follow the detailed instructions in [Set Up Authentication in Azure App Service](./azure_app_service_auth_setup.md) to add authentication to your web app
32
19
3. This will ensure only authorized users can access your application
33
20
34
-
### Step 3: Access and Configure the Admin Site
21
+
### Step 2: Access and Configure the Admin Site
35
22
36
23
1.**Navigate to the admin site** using the following URL pattern:
Copy file name to clipboardExpand all lines: scripts/post_deployment_setup.ps1
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -107,9 +107,10 @@ else {
107
107
$existingAssignment= az role assignment list --assignee $currentUserOid--role $kvSecretsUserRoleId--scope $kvResourceId--query "[0].id"-o tsv 2>$null
108
108
if (-not$existingAssignment) {
109
109
Write-Host"✓ Assigning 'Key Vault Secrets User' role to current user on Key Vault..."
110
-
az role assignment create --assignee-object-id $currentUserOid--assignee-principal-type User --role $kvSecretsUserRoleId--scope $kvResourceId|Out-Null
110
+
$roleOutput=az role assignment create --assignee-object-id $currentUserOid--assignee-principal-type User --role $kvSecretsUserRoleId--scope $kvResourceId2>&1|Out-String
111
111
if ($LASTEXITCODE-ne0) {
112
-
Write-Warning"⚠ Failed to assign Key Vault Secrets User role. You may not have Owner/User Access Administrator permissions."
112
+
Write-Warning"⚠ Failed to assign Key Vault Secrets User role."
113
+
Write-Warning"$roleOutput"
113
114
} else {
114
115
Write-Host"✓ Role assigned. Waiting 30s for propagation..."
115
116
Start-Sleep-Seconds 30
@@ -127,9 +128,9 @@ else {
127
128
if ($kvPublicAccess-eq"Disabled") {
128
129
Write-Host"Key Vault has public access disabled (private networking detected)."
129
130
Write-Host"✓ Temporarily enabling public access on Key Vault '$keyVaultName'..."
130
-
az keyvault update --name $keyVaultName--resource-group $ResourceGroupName--public-network-access Enabled |Out-Null
Copy file name to clipboardExpand all lines: scripts/post_deployment_setup.sh
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -73,11 +73,13 @@ else
73
73
EXISTING_ASSIGNMENT=$(az role assignment list --assignee "$CURRENT_USER_OID" --role "$KV_SECRETS_USER_ROLE_ID" --scope "$KV_RESOURCE_ID" --query "[0].id" -o tsv 2>/dev/null || true)
74
74
if [ -z"$EXISTING_ASSIGNMENT" ];then
75
75
echo"✓ Assigning 'Key Vault Secrets User' role to current user on Key Vault..."
76
-
if az role assignment create --assignee-object-id "$CURRENT_USER_OID" --assignee-principal-type User --role "$KV_SECRETS_USER_ROLE_ID" --scope "$KV_RESOURCE_ID"> /dev/null 2>&1;then
76
+
ROLE_ERR=$(az role assignment create --assignee-object-id "$CURRENT_USER_OID" --assignee-principal-type User --role "$KV_SECRETS_USER_ROLE_ID" --scope "$KV_RESOURCE_ID"2>&1> /dev/null)||true
77
+
if [ $?-eq 0 ] && [ -z"$ROLE_ERR" ] || az role assignment list --assignee "$CURRENT_USER_OID" --role "$KV_SECRETS_USER_ROLE_ID" --scope "$KV_RESOURCE_ID" --query "[0].id" -o tsv 2>/dev/null | grep -q .;then
77
78
echo"✓ Role assigned. Waiting 30s for propagation..."
78
79
sleep 30
79
80
else
80
-
echo"⚠ WARNING: Failed to assign Key Vault Secrets User role. You may not have Owner/User Access Administrator permissions."
81
+
echo"⚠ WARNING: Failed to assign Key Vault Secrets User role."
82
+
echo"$ROLE_ERR"
81
83
fi
82
84
else
83
85
echo"✓ Current user already has 'Key Vault Secrets User' role on Key Vault."
@@ -92,8 +94,10 @@ else
92
94
if [ "$KV_PUBLIC_ACCESS"="Disabled" ];then
93
95
echo"Key Vault has public access disabled (private networking detected)."
94
96
echo"✓ Temporarily enabling public access on Key Vault '${KEY_VAULT_NAME}'..."
0 commit comments