MicrosoftLearning / mslearn-knowledge-mining

Lab files for Azure AI Knowledge Mining modules
https://microsoftlearning.github.io/mslearn-knowledge-mining/
MIT License
81 stars 152 forks source link

Lab Create a Custom Skill for Azure AI Search - Function Deployment Failure #54

Open SkillableJM opened 1 week ago

SkillableJM commented 1 week ago

Lab: Create a Custom Skill for Azure AI Search Task: Create an Azure Function for a custom skill Step: 1. In the Azure Portal, on the Home page, create a new Function App resource with the following settings:

image

We have users reporting that they are unable to create a function app in the Azure portal due to region limitations. I have been able to reproduce this issue when deploying the function app in East US. Users can work around this issue by deploying the function app in a different region than East US. I was able to deploy the function app within Central US without any issues.

Attached is the error json.

image

FunctionAppError.json

Skillable-Dev-Ap commented 1 day ago

This issue has been addressed and students launching the should only be able to launch in regions with no limitations to whats needed for the purpose of this lab.

jjelosua commented 4 hours ago

I am still facing issues while creating a Function App: "{"code":"InvalidTemplateDeployment","details":[{"code":"RequestDisallowedByPolicy","target":"FunctionApp46344302","message":"Resource 'FunctionApp46344302' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"ai102_LP5_V1\",\"id\":\"/providers/Microsoft.Management/managementGroups/lod-org-363-pool-729-lab154265/providers/Microsoft.Authorization/policyAssignments/policyAssignment2735\"},\"policyDefinition\":{\"name\":\"ai102_LP5_V1\",\"id\":\"/providers/Microsoft.Management/managementGroups/lod-org-363-pool-729-lab154265/providers/Microsoft.Authorization/policyDefinitions/policy2735\"}}]'.","additionalInfo":[{"type":"PolicyViolation","info":{"evaluationDetails":{"evaluatedExpressions":[{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.web/serverfarms","operator":"Equals"},{"result":"False","expressionKind":"Field","expression":"id","path":"id","expressionValue":"/subscriptions/4ce44305-7594-411f-ad28-b939b6978b7a/resourceGroups/ai102lab12/providers/Microsoft.Web/sites/FunctionApp46344302","targetValue":"/resourceGroups/ResourceGroup1/","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.AlertsManagement/smartDetectorAlertRules","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.BotService/botServices","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.CognitiveServices/accounts","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.ManagedIdentity/userAssignedIdentities","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.OperationalInsights/workspaces","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.Insights/ActionGroups","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"microsoft.insights/components","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.Search/searchServices","operator":"Contains"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/sites","targetValue":"Microsoft.Storage/storageAccounts","operator":"Contains"}]},"policyDefinitionId":"/providers/Microsoft.Management/managementGroups/lod-org-363-pool-729-lab154265/providers/Microsoft.Authorization/policyDefinitions/policy2735","policyDefinitionName":"policy2735","policyDefinitionDisplayName":"ai102_LP5_V1","policyDefinitionEffect":"deny","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/lod-org-363-pool-729-lab154265/providers/Microsoft.Authorization/policyAssignments/policyAssignment2735","policyAssignmentName":"policyAssignment2735","policyAssignmentDisplayName":"ai102_LP5_V1","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/lod-org-363-pool-729-lab154265","policyAssignmentParameters":{},"policyExemptionIds":[]}}]}],"message":"The template deployment failed with multiple errors. Please see details for more information."}"