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
398 stars 191 forks source link

Hard to restore environment for an existing deployment #2041

Open puicchan opened 1 year ago

puicchan commented 1 year ago

Repro steps

? Please enter a new environment name: asa-springapps ? Please select an Azure Subscription to use: 20. Azure SDK Test Resources (2cd617ea-1866-46b1-90e3-fffb087ebf9b) ? Please select an Azure location to use: 44. (US) East US 2 (eastus2) Environments setting refresh completed

If either sub or location is provided incorrectly, I get "ERROR: getting deployment: error retrieving state: retrieving deployment: deployment not found" with no way to rest the values.

Also, the message said: "Please enter a new environment name" - it's not a new environment but an existing environment.

vhvb1989 commented 1 year ago

Also, the message said: "Please enter a new environment name" - it's not a new environment but an existing environment.

I think we can improve this. But, I don't think we can do anything about asking subscription and location. We could search for the resource group within all your subscriptions, but for users with many subs, this would be super slow.

We could maybe think in some sort of cloud-profile for azd, where customers could set some strategy to keep the state for all deployments/actions from his account.