如何创建强制标记但不强制标记的策略。 [英] How to create a policy that enforces a tag but not it's value.

查看:76
本文介绍了如何创建强制标记但不强制标记的策略。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有,

我正在尝试制定一项强制使用特定代码的政策,例如costcode和所有者(我不介意这些是独立的策略)我知道Azure有一个强制标记和值,但这对我不起作用,因为标记的值将是
总是不同。

I'm trying to make a policy that enforces the use of specific tags for example costcode and owner (I don't mind if these are separate policies)I know Azure has one that enforces tag and value but that doesn't work for me because the value of the tag will always be different.

任何帮助都将是很好。

干杯,

尼克。

推荐答案

嗨尼克,

您应该可以使用  https://docs.microsoft.com / en-us / azure / governance / policy / samples / enforce-tag-match-pattern

You should be able to use https://docs.microsoft.com/en-us/azure/governance/policy/samples/enforce-tag-match-pattern

将匹配模式替换为"like"并使用通配符(*)作为值

Replace the match pattern with "like" and use the wildcard (*) as the value

hth

Marcin

hth
Marcin


这篇关于如何创建强制标记但不强制标记的策略。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆