Azure 中是否有任何方法可以根据参数或变量的值使用类似于 CASE 的语句?
例如:
if vmName = "DB" then adminloginName = "DBAdmin"
if vmName = "RDP" then adminlogonNAme = "RDPAdmin"
最佳答案
不,ARM 模板从今天起尚不支持类似于 Case 的语句。
但是,它们已经支持逻辑 if
函数。
Logical functions
Resource Manager provides the following functions for working with logical conditions:
- and
- bool
- if
- not
- or
引用:Azure Resource Manager template functions - Logical Functions
关于azure - ARM 模板中有什么方法可以使用类似 Case 的语句吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48685408/