Den*_*dic 5 azure azure-resource-manager azure-rm-template
在具有以下参数的ARM模板中:
{
"$schema": "...",
"contentVersion": "1.0.0.0",
"parameters": {
...
"SkipThisComponent": {
"type": "bool"
...
}
Run Code Online (Sandbox Code Playgroud)
如何在资源条件下使用它?
"resources": [
{
"apiVersion": "...",
"name": "...",
"type": "...",
"condition": "[???]",
Run Code Online (Sandbox Code Playgroud)
我尝试了几种方法,但它似乎equals只支持[int,string,array或object],if需要条件和值来匹配它等等.我没有找到一个很好的干净方法,所有似乎都是变通方法与铸造......
Mar*_*ndl 11
你可以在条件中使用变量:
"condition" : "[variables('SkipThisComponent')]"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2071 次 |
| 最近记录: |