-
Hi bicep github group, New-AzResourceGroupDeployment: 10:15:18 PM - Error: Code=InvalidTemplateDeployment; Message=The template deployment 'main' is not valid according to the validation procedure. The tracking id is '4572273f-8839-4ca3-88bb-e092743a4b5f'. See inner errors for details. New-AzResourceGroupDeployment: 10:15:18 PM - Error: Code=; Message=Object reference not set to an instance of an object. New-AzResourceGroupDeployment: The deployment validation failed Before I practice this exercise today, the previous exercise were running fine without any error. I am sure that I have established the connection successfully via powershell terminal with connect-AzAccount and set the active subscription correctly as I launched the portal.azure.com/#home portal and run Get-azsubscription information from my powershell terminal on my laptop as well. Please help and provide guidance if you have faced similar problem in the past or etc. Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
Hi @vbeer008 One thing to be aware of is that when you copy this code, you have to ensure there are no spaces after the backtick ` Sometimes when you copy the code, it can add spaces. I would recommend in this case to just put this on a single line. New-AzResourceGroupDeployment -TemplateFile main.bicep -environmentType nonprod Also are you using the sandbox or doing this locally? |
Beta Was this translation helpful? Give feedback.
-
Please use the built-in tool at the bottom of the Learn page to register your issues. There is a dedicated team who cover this. |
Beta Was this translation helpful? Give feedback.
-
Finally, got the problem solved with Azure Support Engineer. From the Azure learning modules, exercise code is missing "properties:{}", you MUST include the empty properties: {} if you don't have any values to set. Original:resource appServicePlan 'Microsoft.Web/serverFarms@2020-06-01' = { Workaround Solution:resource appServicePlan 'Microsoft.Web/serverFarms@2020-06-01' = { |
Beta Was this translation helpful? Give feedback.
Finally, got the problem solved with Azure Support Engineer.
There has a bug for AppServicePlain ==> Microsoft.Web/serverFarms
From the Azure learning modules, exercise code is missing "properties:{}", you MUST include the empty properties: {} if you don't have any values to set.
Original:
resource appServicePlan 'Microsoft.Web/serverFarms@2020-06-01' = {
name: appServicePlanName
location: location
sku: {
name: appServicePlanSku.name
tier: appServicePlanSku.tier
capacity: appServicePlanInstanceCount
}
}
Workaround Solution:
resource appServicePlan 'Microsoft.Web/serverFarms@2020-06-01' = {
name: appServicePlanName
location: location
sku: {
name: appServicePlanSku.name
tier: appServicePlan…