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/CustomizingAzdParameters.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ By default this template will use the environment name as the prefix to prevent
22
22
|`AZURE_ENV_EMBEDDING_MODEL_CAPACITY`| integer |`80`| Sets the capacity for the embedding model deployment. |
23
23
|`AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID`| string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md)| Reuses an existing Log Analytics Workspace instead of creating a new one. |
24
24
|`AZURE_EXISTING_AI_PROJECT_RESOURCE_ID`| string | Guid to get your existing AI Foundry Project resource ID | Reuses an existing AIFoundry and AIFoundryProject instead of creating a new one. |
25
+
|`AZURE_ENV_ACR_NAME`| string |`byocgacontainerreg`| Sets the Azure Container Registry name (allowed value: `byocgacontainerreg`)|
26
+
|`AZURE_ENV_OPENAI_LOCATION`| string |`<User selects during deployment>`| Sets the Azure region for OpenAI resource deployment. |
Copy file name to clipboardExpand all lines: infra/scripts/run_create_index_scripts.sh
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,24 @@ fi
83
83
echo"User already has the Azure AI User role."
84
84
fi
85
85
86
+
### Assign Cognitive Services OpenAI User role to the signed in user ###
87
+
88
+
# Check if the user has the Cognitive Services OpenAI User role
89
+
echo"Checking if user has the Cognitive Services OpenAI User role"
90
+
role_assignment=$(MSYS_NO_PATHCONV=1 az role assignment list --role 5e0bd9bd-7b93-4f28-af87-19fc36ad61bd --scope $aif_resource_id --assignee $signed_user_id --query "[].roleDefinitionId" -o tsv)
91
+
if [ -z"$role_assignment" ];then
92
+
echo"User does not have the Cognitive Services OpenAI User role. Assigning the role."
93
+
MSYS_NO_PATHCONV=1 az role assignment create --assignee $signed_user_id --role 5e0bd9bd-7b93-4f28-af87-19fc36ad61bd --scope $aif_resource_id --output none
94
+
if [ $?-eq 0 ];then
95
+
echo"Cognitive Services OpenAI User role assigned successfully."
96
+
else
97
+
echo"Failed to assign Cognitive Services OpenAI User role."
98
+
exit 1
99
+
fi
100
+
else
101
+
echo"User already has the Cognitive Services OpenAI User role."
102
+
fi
103
+
86
104
### Assign Search Index Data Contributor role to the signed in user ###
0 commit comments