Skip to content

Troubleshooting

Add -ErrorLogPath to the failing plan, WhatIf, or deployment command:

Terminal window
New-AzureSqlVmToolkitDeployment `
-ConfigFile .\config.local.yaml `
-WhatIf `
-ErrorLogPath .\test-results\errors\deployment.jsonl

The file is created only for a terminating failure. Inspect its run ID, phase, resource context, and Azure correlation ID:

Terminal window
Get-Content .\test-results\errors\deployment.jsonl |
ForEach-Object { $_ | ConvertFrom-Json } |
Select-Object timestampUtc, runId, mode, phase, azureCorrelationId

Known secret formats are redacted, but exception text can come from external providers. Review the file before sharing it and keep it out of source control. If logging itself fails, the warning describes the logging problem while the original deployment error remains the terminating error.

Install it:

Terminal window
Install-Module -Name powershell-yaml -Scope CurrentUser -Force

Real deployment requires:

Terminal window
Connect-AzAccount

-Plan does not require Azure sign-in.

Create the secret in Key Vault before deploying, or use -GeneratePassword for a disposable lab.

The script rejects existing Key Vaults that do not use RBAC authorization. Use a different vault name or migrate the vault.

Validation rejects inbound 3389 and 1433 from broad sources. Keep Bastion-only access or restrict the source prefix.

Run:

Terminal window
.\scripts\Test-Local.ps1 -ConfigFile .\config.local.yaml