为了减少无意义的输出,可以使用--query参数。此外,建议仅在必要时使用what-if命令,以避免产生大量不必要的输出。
以下是一个代码示例,演示如何使用--query参数限制what-if输出:
bicep build main.bicep
az deployment group what-if --name myDeployment --resource-group myResourceGroup --template-file ./main.json --parameters ./params.json --query "changes[].{resourceId:id,changeType:changeType}"