Ensure any active leases are brokend before deleting
This commit is contained in:
parent
920da9d0a4
commit
aed97e1a8b
|
@ -35,8 +35,12 @@ func NewStepDeleteAdditionalDisks(client *AzureClient, ui packer.Ui) *StepDelete
|
|||
|
||||
func (s *StepDeleteAdditionalDisk) deleteBlob(storageContainerName string, blobName string) error {
|
||||
blob := s.client.BlobStorageClient.GetContainerReference(storageContainerName).GetBlobReference(blobName)
|
||||
err := blob.Delete(nil)
|
||||
if _, err := blob.BreakLease(nil); err != nil {
|
||||
s.say(s.client.LastError.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
err := blob.Delete(nil)
|
||||
if err != nil {
|
||||
s.say(s.client.LastError.Error())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue