Skip to content

Commit

Permalink
Imaging Add-On BugFix: Typo in automation and Generalize shutdown bre…
Browse files Browse the repository at this point in the history
…aks image (Azure#1077)

* bugfix: generalizeVM forces shutdown too early

* fixed typo in param

---------

Co-authored-by: Jason Masten <jamasten@microsoft.com>
  • Loading branch information
chbragg and jamasten authored Aug 29, 2024
1 parent 2faf262 commit 40ed7b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bicep/add-ons/imaging/modules/automationAccount.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ resource updateRunBook 'Microsoft.Compute/virtualMachines/runCommands@2023-07-01
value: environment().resourceManager
}
{
name: 'RunbBookScriptContent'
name: 'RunBookScriptContent'
value: loadTextContent('../scripts/New-AzureZeroTrustImageBuild.ps1')
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ resource generalizeVirtualMachine 'Microsoft.Compute/virtualMachines/runCommands
}
# Stop the VM
$null = Invoke-RestMethod -Headers $AzureManagementHeader -Method 'Post' -Uri $($ResourceManagerUriFixed + $VmResourceId + '/powerOff?api-version=2024-03-01')
#$null = Invoke-RestMethod -Headers $AzureManagementHeader -Method 'Post' -Uri $($ResourceManagerUriFixed + $VmResourceId + '/powerOff?api-version=2024-03-01')
# Wait for it to show as stopped in Azure
Do {
Start-Sleep -Seconds 5
Expand Down

0 comments on commit 40ed7b4

Please sign in to comment.