afd33679f5
Previously (prior to v1.6.2) the Azure ARM builder had two delete functions one that would run before any of the StepDelete* types, and one on deployment template cleanup. The refactored coded re-introduces the logic from the previously removed step in v1.6.1 as the main delete logic for the whole deployment template. Ensuring that all deployed items are deleted before trying to remove any managed disks. This change moves all the deletion logic into the step_deployment_template#Cleanup function to ensure that dependent steps are only called once the created deployment items (i.e StepDelateAdditionalDisks) have been deleted. Test results before change ``` compute.DisksClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="OperationNotAllowed" Message="Disk pkrdd02e9rzzu5k-1 is attached to VM /subscriptions/1f90521a-24f6-4758-ac3d-88d869fb0bf5/resourceGroups/packer-acceptance-test/providers/Microsoft.Compute/virtualMachines/pkrvm02e9rzzu5k." --- FAIL: TestBuilderAcc_ManagedDisk_Windows_Build_Resource_Group_Additional_Disk (454.00s) FAIL FAIL github.com/hashicorp/packer/builder/azure/arm 454.008s ``` Test results after change ``` --- PASS: TestBuilderAcc_ManagedDisk_Windows_Build_Resource_Group_Additional_Disk (563.56s) ``` Closes #10070 |
||
---|---|---|
.. | ||
arm | ||
chroot | ||
common | ||
dtl | ||
pkcs12 | ||
LICENSE | ||
TODO.md |