Azure 已跳过模板输出求值
如果我尝试部署我的arm模板(类似这样的内容) 如果出于任何原因,这不顺利,我无法读取Powershell中的输出。我得到以下信息:Azure 已跳过模板输出求值,azure,azure-resource-manager,arm-template,Azure,Azure Resource Manager,Arm Template,如果我尝试部署我的arm模板(类似这样的内容) 如果出于任何原因,这不顺利,我无法读取Powershell中的输出。我得到以下信息: Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details 我应该如何做才能在执行错误的情况下将输出参数传递给powershell脚本 我的Powershel
Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details
我应该如何做才能在执行错误的情况下将输出参数传递给powershell脚本
我的Powershell代码:
//Standard PowerShell code for Deploying ARM Template
try
{
Stop-AzureRmWebApp -ResourceGroupName $ResourceGroupName -Name $deployment.Outputs.item("AFU").value
Suspend-AzureRmAnalysisServicesServer -Name $deployment.Outputs.item("AAS").value -ResourceGroupName $ResourceGroupName
}
catch
{
Write-Host "error here"
}
你在这里什么都做不了。仅当ARM模板流中没有错误时才会生成输出。因此,您需要您的ARM模板能够成功地检索这些(无论您使用哪种工具,它们背后的API始终是相同的)
//Standard PowerShell code for Deploying ARM Template
try
{
Stop-AzureRmWebApp -ResourceGroupName $ResourceGroupName -Name $deployment.Outputs.item("AFU").value
Suspend-AzureRmAnalysisServicesServer -Name $deployment.Outputs.item("AAS").value -ResourceGroupName $ResourceGroupName
}
catch
{
Write-Host "error here"
}