Skip to content

Commit dfdaacf

Browse files
Copilotvhvb1989
andcommitted
Add detailed comments explaining state voiding behavior
Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
1 parent 789a901 commit dfdaacf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,10 @@ func (p *BicepProvider) Destroy(
829829
return nil, fmt.Errorf("mapping resources to resource groups: %w", err)
830830
}
831831

832-
// If no resources found, we still need to void the deployment state
833-
// This can happen when resources have been manually deleted
832+
// If no resources found, we still need to void the deployment state.
833+
// This can happen when resources have been manually deleted before running azd down.
834+
// Voiding the state ensures that subsequent azd provision commands work correctly
835+
// by creating a new empty deployment that becomes the last successful deployment.
834836
if len(groupedResources) == 0 {
835837
p.console.StopSpinner(ctx, "", input.StepDone)
836838
// Call deployment.Delete to void the state even though there are no resources to delete

0 commit comments

Comments
 (0)