Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

[Bug] Prompt for location when location is already set as parameter with fixed value #1983

Open vhvb1989 opened 1 year ago

vhvb1989 commented 1 year ago

Repo:

In main.parameters.json set a location like:

  "parameters": {
    "location": {
      "value": "centralus"
    }
  }

Then run azd provision from a new environment (azd env new).

Issue: azd prompts for a location:

image

The selected location from the prompt is ignored and after azd provision finished, the location is updated in the environment. So the only problem is the extra useless prompt for location,, that is actually ignored.

rajeshkamal5050 commented 1 year ago

@ellismg Can you link it with the other Region sorting/filtering issue.?

ellismg commented 1 year ago

See #2387, where my spike had a fix for this issue by looking at the main.parameters.bicep and looking for ${AZURE_LOCATION} and not prompting if it was not referenced.