This is a behavioral issue. Resource group deployments are deleted after "Start-AzImageBuilderTemplate" cmdlet fails. This prevents anyone from having the ability to diagnose what went wrong in the event of a failure. That cmdlet will create a resource group in Azure, with an auto-generated name; that's where it provisions a VM and attempts to build the image. Provisioning the resources creates a deployment in the resource group. When the cmdlet finishes or fails, it automatically deletes the deployment from the resource group, preventing further diagnosis.
Description
This is a behavioral issue. Resource group deployments are deleted after "Start-AzImageBuilderTemplate" cmdlet fails. This prevents anyone from having the ability to diagnose what went wrong in the event of a failure. That cmdlet will create a resource group in Azure, with an auto-generated name; that's where it provisions a VM and attempts to build the image. Provisioning the resources creates a deployment in the resource group. When the cmdlet finishes or fails, it automatically deletes the deployment from the resource group, preventing further diagnosis.
Issue script & Debug output
Environment data
Module versions
Error output