I have a number of templates which load configuration from a json file.
Template Analyzer produces this error for templates which use this pattern
(However, given the ambiguity of the exception, it's hard to tell if the issue is the usage of json content or not)
Exception details:
Microsoft.Azure.Templates.Analyzer.Core.TemplateAnalyzerException: Error compiling Bicep template
---> System.Exception: Bicep issues found:
Expected the "]" character at this location.
This declaration type is not recognized. Specify a metadata, parameter, variable, resource, or output declaration.
at Microsoft.Azure.Templates.Analyzer.BicepProcessor.BicepTemplateProcessor.ConvertBicepToJson(String bicepPath)
at Microsoft.Azure.Templates.Analyzer.Core.TemplateAnalyzer.AnalyzeTemplate(String template, String templateFilePath, String parameters)
--- End of inner exception stack trace ---
at Microsoft.Azure.Templates.Analyzer.Core.TemplateAnalyzer.AnalyzeTemplate(String template, String templateFilePath, String parameters)
at Microsoft.Azure.Templates.Analyzer.Cli.CommandLineParser.AnalyzeTemplate(TemplateAndParams templateAndParameters)
Expected behavior
No error; template is analyzed
Reproduction Steps
config.json (referenced from cosmos.bicep - check relative path)
Describe the bug
I have a number of templates which load configuration from a json file. Template Analyzer produces this error for templates which use this pattern (However, given the ambiguity of the exception, it's hard to tell if the issue is the usage of json content or not)
Expected behavior
No error; template is analyzed
Reproduction Steps
config.json (referenced from cosmos.bicep - check relative path)
cosmos.bicep:
cosmos-container.bicep (referenced from cosmos.bicep)
Environment
No response