Merge pull request #7203 from paulmey/deallocate
[azure] use deallocate instead of just power-off
This commit is contained in:
commit
a01dfb7834
|
@ -28,7 +28,7 @@ func NewStepPowerOffCompute(client *AzureClient, ui packer.Ui) *StepPowerOffComp
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StepPowerOffCompute) powerOffCompute(ctx context.Context, resourceGroupName string, computeName string) error {
|
func (s *StepPowerOffCompute) powerOffCompute(ctx context.Context, resourceGroupName string, computeName string) error {
|
||||||
f, err := s.client.VirtualMachinesClient.PowerOff(ctx, resourceGroupName, computeName)
|
f, err := s.client.VirtualMachinesClient.Deallocate(ctx, resourceGroupName, computeName)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = f.WaitForCompletion(ctx, s.client.VirtualMachinesClient.Client)
|
err = f.WaitForCompletion(ctx, s.client.VirtualMachinesClient.Client)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue