-
Notifications
You must be signed in to change notification settings - Fork 708
Add support for selecting existing Azure resource groups during provisioning with improved UX flow #12302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12302Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12302" |
1 similar comment
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12302Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12302" |
|
@copilot Fix 🔴 Aspire.Hosting.Azure.Tests.AzureDeployerTests.DeployAsync_PromptsViaInteractionService |
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Fixed in commit 3920156. The test now expects Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
|
||
| public async Task<IEnumerable<string>> GetAvailableResourceGroupsAsync(string subscriptionId, CancellationToken cancellationToken = default) | ||
| { | ||
| var subscription = await armClient.GetSubscriptions().GetAsync(subscriptionId, cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In many cases we would have already queried for the subscription ID or gotten the subscription list, can we cache the result or do we want to fetch each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subscription resource is already obtained earlier in the flow (via GetSubscriptionAndTenantAsync), so we're already making that call. The resource groups are fetched once when the subscription is selected and used to populate the dropdown. For the current implementation, I've kept it simple without additional caching since the fetch happens only once per provisioning session. If we need cross-session caching, we could consider adding it to the deployment state manager in a future update.
|
@copilot We need to change the ux such that the resource group selection comes before the location selection. Only if a new / custom resource group is selected do we need to prompt for location. |
- Resource group selection now comes before location selection - Location is only prompted when creating a new resource group - When selecting an existing resource group, its location is automatically used - Added GetAvailableResourceGroupsWithLocationAsync to fetch RG details - Updated both RunMode and PublishMode providers - Added new localization strings for resource group dialog - Updated all tests to reflect new UX flow Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Fixed in commit 9fb6926. The UX now prompts for resource group selection first. If an existing resource group is selected, its location is automatically used. Location is only prompted when creating a new resource group (custom name entered). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
This PR implements support for selecting existing Azure resource groups during Aspire provisioning, addressing issue #12084. The implementation features an improved UX flow where resource group selection comes before location selection, and location is only prompted when creating a new resource group.
Changes Made
Key Features
Testing
Fixes #11037
Original prompt
Fixes #11037
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.