sign icon indicating copy to clipboard operation
sign copied to clipboard

ARM deployment template broken

Open andrewmolyneux opened this issue 5 years ago • 0 comments

I've just been trying to deploy SignService again from scratch (as I'm pretty sure I'd royally messed it up while trying to get it working) - the last time I deployed was in March this year and when I tried to deploy this time I got this error output:

2:11:50 - VERBOSE: Performing the operation "Creating Deployment" on target "SignService-App".
12:11:50 - New-AzureRmResourceGroupDeployment : 12:11:50 - Error: Code=InvalidTemplate; Message=Deployment template validation 
12:11:50 - failed: 'The resource 
12:11:50 - 'Microsoft.Web/Sites/[Site Name]/siteextensions/Microsoft.ApplicationInsights.AzureWebSites' is not defined in 
12:11:50 - the template. Please see https://aka.ms/arm-template for usage details.'.
12:11:50 - At D:\git\SignService\arm\ArmDeploy\bin\Release\staging\ArmDeploy\Deploy-AzureResourceGroup.ps1:108 char:5
12:11:50 - +     New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
12:11:50 - +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:11:50 -     + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
12:11:50 -     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep 
12:11:50 -    loymentCmdlet
12:11:50 -  
12:11:50 - New-AzureRmResourceGroupDeployment : The deployment validation failed
12:11:50 - At D:\git\SignService\arm\ArmDeploy\bin\Release\staging\ArmDeploy\Deploy-AzureResourceGroup.ps1:108 char:5
12:11:50 - +     New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
12:11:50 - +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:11:50 -     + CategoryInfo          : CloseError: (:) [New-AzureRmResourceGroupDeployment], InvalidOperationException
12:11:50 -     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep 
12:11:50 -    loymentCmdlet
12:11:50 -  
12:11:51 - 
12:11:51 - Template deployment returned the following errors:
12:11:51 - 12:11:50 - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The resource 'Microsoft.Web/Sites/[Site Name]/siteextensions/Microsoft.ApplicationInsights.AzureWebSites' is not defined in the template. Please see https://aka.ms/arm-template for usage details.'.
12:11:51 - The deployment validation failed
12:11:51 - 
12:11:51 - 
12:11:51 - Deploying template using PowerShell script failed.
12:11:51 - Tell us about your experience at https://go.microsoft.com/fwlink/?LinkId=691202

Looking at the history for that file, it seems the resource that it's complaining is missing (Microsoft.Web.Sites/[Site Name]/siteextensions/Microsoft.ApplicationInsights.AzureWebSites) was removed from azuredeploy.json in commit 908dab55c66a2e37b4e9d1b62db3f47293caf092. I'm pretty sure this must have been a mistake?

After reinstating that chunk of the template, deployment still failed the first time (after much longer, and with a different error that I sadly failed to make a note of) but I tried it again and it worked on the second attempt, so I'm just going to assume that was one of those temporary Azure glitches and everything's OK now 🤣

andrewmolyneux avatar Aug 07 '20 11:08 andrewmolyneux