Skip to content

Commit

Permalink
refactor: using deleteIfNicExists directly in cleanupAzureResources
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce-Soghigian committed Jan 28, 2025
1 parent cfa1776 commit 0ea44f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ func (p *DefaultProvider) cleanupAzureResources(ctx context.Context, resourceNam
// nic, disk and all associated resources will be removed. If the VM was not created successfully and a nic was found,
// then we attempt to delete the nic.

nicErr := p.DeleteNic(ctx, resourceName)
nicErr := deleteNicIfExists(ctx, p.azClient.networkInterfacesClient, p.resourceGroup, resourceName)
if nicErr != nil {
logging.FromContext(ctx).Errorf("networkinterface.Delete for %s failed: %v", resourceName, nicErr)
}
Expand Down

0 comments on commit 0ea44f4

Please sign in to comment.