我可以通过Azure策略添加多个语句或多个效果吗?
我需要创建一个Azure策略,以在没有标签的情况下创建的资源添加标签(例如名称,支持,CostCenter),
问题是,如果例如我创建VM并添加了名称标签,但我忘记了支持和CostCenter I希望我的策略添加这两个并保留我的姓名价值标签。
我可以添加一些条件来修改效果吗?还是倍数,如果/然后在定义中对象?
谢谢,
I need to create an Azure policy for adding tags to resources which are being created without tags (eg name, support, costcenter)
The issue is that if for example I create a VM and I add Name tag, but I forget support and costcenter I want that my policy adds this two and keep my Name value tag.
Can I add some condition to modify effect? Or multiples if/then objects in the definition?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为,如果/then 块可以根据Azure Policy模式[此处] [1]提供多个
。另外,这是DOC页面演示[策略定义结构] [1]。
但是,就您而言,您不需要这个,您可能只需要[]操作中的额外操作。
I don't think multiple
if/then
blocks are available as per Azure Policy schema [here][1]. Also here's the doc page demonstrates the [policy definition structure][1].However, in your case, you don't need this, you might only need extra operations inside the []operations.
是的,您可以添加倍数条件语句。
有关结合逻辑运算符
Yes, you can add multiples conditional statements.
More information about Combining Logical operators