Validation error on Log Analytics creation
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
**Bicep version**
run `bicep --version` via the Bicep CLI, `az bicep version` via the AZ CLI or via VS code by navigating to the extensions tab and searching for Bicep
Bicep CLI version 0.2.328 (a13b032755)
**Describe the bug**
A clear and concise description of what the bug is vs what you expected to happen
I have a script that was running for a few months then about 3 weeks ago begin giving the following error:
```
InvalidTemplateDeployment - The template deployment 'baseCluster' is not valid according to the validation procedure. The tracking id is 'dfd1aa64-206a-4631-bdd7-32d66de71a6a'. See inner errors for details.
GetLogAnalyticsWorkspaceError - Provisioning of resource(s) for container service base156-aks in resource group base156-EastUS-rg failed. Message: Unable to get log analytics workspace info. Resource ID: /subscriptions/2159f493-f4d2-4f96-ad4d-a9f6ae4ee050/resourceGroups/base156-EastUS-rg/providers/Microsoft.OperationalInsights/workspaces/base156-la. Details: Category: ClientError; Code: ResourceNotFound; SubCode: ResourceNotFound; Message: Unable to retrieve log analytics workspace. Please resolve the issue below and try again. If resource is intentionally deleted to stop monitoring, please also disable monitoring addon by following doc: https://aka.ms/aks-disable-monitoring-addon. If resource is deleted by mistake, please re-create it by following doc: https://aka.ms/new-log-analytics, and enable new workspace resource id by following doc: https://aka.ms/aks-enable-addons. Resource ID: /subscriptions/2159f493-f4d2-4f96-ad4d-a9f6ae4ee050/resourceGroups/base156-EastUS-rg/providers/Microsoft.OperationalInsights/workspaces/base156-la. Error details: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.OperationalInsights/workspaces/base156-la' under resource group 'base156-EastUS-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix".; InnerMessage: ; Dependency: Microsoft.OperationalInsights/workspaces; AKSTeam: RP; OriginalError: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.OperationalInsights/workspaces/base156-la' under resource group 'base156-EastUS-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"; Retriable: false. Please recreate or unlock the log analytics workspace before proceed the last operation. For more details about how to create and use log analytics workspace, please refer to: https://aka.ms/new-log-analytics. Details:
```
This is a resource that is being created in the template and then referenced later for the la info for the cluster. Even adding an explicit dependson does not resolve the issue.
Expected:
For the template to pass validation.
**To Reproduce**
Steps to reproduce the behavior: just rerun my script
**Additional context**
Add any other context about the problem here.
Link to the script that worked on the date uploaded: https://github.com/cwash05/aks/tree/main/baseCluster
some changes need to be made to make it run now.
in the aksdeploy.sh script change
line 168: comment out
#"EnableOIDCIssuerPreview"
line 216 change to
kubernetesVersion=$(az aks get-versions --location $location --query "values[?isPreview==false].version | sort(@) | [-2]" --output tsv)
in the baseCluster.bicep file
add
servicePrincipalProfile:{
clientId: 'msi'
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by rerunning the deployment from the linked baseCluster script, then read aksdeploy.sh and baseCluster.bicep around the Log Analytics workspace and AKS configuration. Compare the reported ResourceNotFound validation failure with the listed version and configuration changes; done means the template deployment passes validation and creates the cluster successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, shell
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100