Skip to content

TemplateAnalyzer: Error parsing Bicep when a parameter isn't specified #65

@pamelafox

Description

@pamelafox

We have a situation where we use azd to deploy Bicep files, and we intentionally leave one of the parameters unspecified, so that azd prompts for that parameter.

However, the template-analyzer errors out in that case:
https://github.com/Azure-Samples/azure-search-openai-demo/actions/runs/5612367638/job/15205930925

    Directory: /home/runner/work/azure-search-openai-demo/azure-search-openai-demo
    Error: An exception occurred while analyzing template /home/runner/work/azure-search-openai-demo/azure-search-openai-demo/infra/main.bicep with parameters file /home/runner/work/azure-search-openai-demo/azure-search-openai-demo/infra/main.parameters.json
    Exception details:
    Microsoft.Azure.Templates.Analyzer.Core.TemplateAnalyzerException: Error while processing template.
     ---> Azure.Deployments.Templates.Exceptions.TemplateValidationException: The value for the template parameter 'openAiResourceGroupLocation' at line '83' and column '36' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.

I tried providing test.parameters.json with it filled in, but that doesn't work due to issue #47

It'd be great if either #47 was fixed or if it didn't error with an unprovided parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions