An exception occurred while analyzing template.
See original GitHub issueDescribe the bug
We receive this error when we analyze bicep templates containing the metadata keyword. Removing the metadata keyword solves this problem, but we need this keyword for documentation and information purposes.
Information regarding this can be found in the reproduction steps.
We get the following errors:
Expected behavior
Template files are analyzed with the metadata section.
Reproduction Steps
Sample bicep
`metadata info = { name: ‘RBAC Module’ description: ‘This module deploys a Role Based Access assignments’ version: ‘1.0.0’ author: ‘Maik van der Gaag’ }
param principalId string param roleDefinitionResourceId string
@description(‘This is the built-in Contributor role. See https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#contributor’) resource roleDefinition ‘Microsoft.Authorization/roleDefinitions@2018-01-01-preview’ existing = { scope: subscription() name: roleDefinitionResourceId }
resource roleAssignment ‘Microsoft.Authorization/roleAssignments@2020-04-01-preview’ = { name: guid(resourceGroup().id, principalId, roleDefinition.id) properties: { roleDefinitionId: roleDefinition.id principalId: principalId principalType: ‘ServicePrincipal’ } scope: resourceGroup() }`
When we analyze this with ‘.\TemplateAnalyzer.exe analyze-template D:\source\rbac.bicep -v’
Environment
- Local and on Microsoft build agents
- .Net 6
Issue Analytics
- State:
- Created 6 months ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Any updates on this?
It’s more the exception/warning that are noisy and not actionable. may be an option to redirect those to a separate log that can be reported to project?
Full output on https://github.com/juju4/azure-search-openai-demo/actions/runs/5299769415/jobs/9592934762#step:11:694