Existing resource group choice¶
Motivation¶
The deployment now uses the fixed default group rg-elb-dashboard. If that group already exists and contains resources, a fresh azd up needs an explicit operator decision instead of silently mixing old and new resources.
User-facing change¶
azd upand./deploy.shdetect whenrg-elb-dashboardalready contains resources.- Interactive runs show the resource count and a small sample, then ask whether to delete the group and continue, keep it and deploy to the next numbered group such as
rg-elb-dashboard-01, or abort. - Non-interactive automation can set
ELB_EXISTING_RG_ACTION=delete|number|abort. - Choosing numbering stores the azd-safe
ELB_RESOURCE_NAME_SLOT=slot01value, which Bicep converts to the visible-01resource-name suffix.
API / IaC diff summary¶
- Added
scripts/dev/resolve-resource-group.shfor resource-group collision detection and action selection. - Added
resourceNameSlottoinfra/main.bicepandinfra/main.parameters.json. - Updated generated names so suffixes apply consistently to
rg-elb-dashboard-01,vnet-elb-dashboard-01,ca-elb-dashboard-01,id-elb-dashboard-01-*,acrelbdashboard01*,stelbdashboard01*, and related resources. - Updated
azure.yaml,deploy.sh, andscripts/dev/azd-progress.shto include the resource-group choice before Bicep provisioning.
Validation evidence¶
az bicep build --file infra/main.bicep --outfile infra/main.jsonbash -n scripts/dev/resolve-resource-group.sh deploy.sh scripts/dev/postprovision.sh scripts/dev/azd-progress.sh scripts/dev/register-providers.shELB_EXISTING_RG_ACTION=number ./scripts/dev/resolve-resource-group.sh --subscription 577d6332-de48-4a30-be66-dded26a712ea --environment elb-dashboard-> detected populatedrg-elb-dashboard, selectedrg-elb-dashboard-01, and persistedELB_RESOURCE_NAME_SLOT=slot01without deleting anything.ELB_RESOURCE_NAME_SLOT=slot01+azd provision --preview --environment elb-dashboard --no-prompt-> previewedrg-elb-dashboard-01,ca-elb-dashboard-01,acrelbdashboard01*, andstelbdashboard01*creation.- Empty
ELB_RESOURCE_NAME_SLOT+azd provision --preview --environment elb-dashboard --no-prompt-> previewed the defaultrg-elb-dashboarddeployment path successfully.