SecureHats/Sentinel-playground

AlertRules fail to deploy

Closed this issue ยท 6 comments

Everything works until the template tries to deploy the AlertRules.

Here is the error summary:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"DeploymentScriptDownloadFailure","message":"The deployment script execution failed because the primary or supporting scripts could not be downloaded successfully due to multiple errors. First error:\r\nMicrosoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information."}]}

The following is the raw error:
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "DeploymentScriptDownloadFailure",
"message": "The deployment script execution failed because the primary or supporting scripts could not be downloaded successfully due to multiple errors. First error:\r\nMicrosoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information."
}
]
}

Here is the full status message. I tried deployments in EastUS and SouthCentralUS.

"status": "failed",
"error": {
"code": "DeploymentScriptDownloadFailure",
"message": "The deployment script execution failed because the primary or supporting scripts could not be downloaded successfully due to multiple errors. First error:\r\nMicrosoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information.",
"details": [
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "Microsoft.PowerShell.Commands.HttpResponseException: Response status code does not indicate success: 404 (Not Found).\n at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 79\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "System.Management.Automation.RuntimeException: Failed to download external script: 404: Not Found\r\nat Start-SystemDeploymentScriptDownloadFile, /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 91\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 200"
},
{
"code": "DeploymentScriptDownloadFailure",
"message": "System.Management.Automation.RuntimeException: Failed to download external script: Failed to download external script: 404: Not Found\r\nat , /mnt/azscripts/azscriptinput/DeploymentScript.ps1: line 219"
}
]
}
}

Hi @cwilliamsipc
Thanks for you valuable feedback!
I will pick this up tomorrow morning and give you an update when I have this fixed.
Expect to have this fixed within the next 24h

Hi @cwilliamsipc,

I was able to reproduce the error, and I'm working on a fix right now.
The name of the script was changed from Enable-AlertRules.ps1 to Update-DetectionRules.ps1 causing the deployment to fail.

The deployment template has been updated and it seems to be working again.
If you have any other issues, or feature request, please reach out!

image