I'm trying to create a VM using below cmdlet in Azure powershell.
New-AzureRmResourceGroupDeployment -Name VmDeployment -ResourceGroupName ABC `
-TemplateFile "C:\Templates\template.json" `
-TemplateParameterFile "C:\Templates\parameters.json"
This cmdlet seems to work for most of the time , but sometimes gives the below error.
New-AzureRmResourceGroupDeployment : An error occurred while sending the request.
At line:1 char:1
+ New-AzureRmResourceGroupDeployment -Name VmDeployment1 -ResourceGroup ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeployment], HttpRequestException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet.
This error meesage doesn't have any relevant information as to why exactly this is failing.
I try to run the cmdlet for few times and it works again. I don't seem to understand why this doesn't work sometimes even though there is no change in the script.
There are few other cmdlets which has the same issue. But for example sake I have mentioned only one.
Any inputs are highly appreciated.Thanks