Azure策略未阻止NSG [英] Azure policies are not blocking NSG

查看:92
本文介绍了Azure策略未阻止NSG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我不知道这里是否是问这个问题的正确地方,但这是问题.

当有人尝试创建具有特定条件的NSG规则时,我执行了一项天蓝色策略来阻止.在门户内部,该策略可以按预期工作,但是,通过powershell创建NSG规则时,该规则不会被阻止.

有人知道我在做什么错吗?

谢谢!

JJ

解决方案

您好,Juancho,

这不应发生


Hi,

I do not know if here is the right place to ask this but here is the thing.

I did an azure policy to block when someone try to create a NSG rule with certain criteria. Inside the portal, the policy works as expected, but, when the NSG rule is created via powershell, it is not blocked.

Anyone knows what I am doing wrong?

Thanks!

JJ

解决方案

Hi Juancho,  

This shouldn't happen. the Azure Policy engine sits in front of the ARM Resource Provider which Portal, PowerShell, CLI, REST all connect to.  My guess is either something else is going on perhaps a different sub, a different RG, an exclusion clause in the policy? or perhaps the NSG creation criteria you have in the portal doesn't exactly match what you are creating via PowerShell.  Can you take a look at the activity logs to see what happens when executing via PowerShell? Would recommend a thorough review of the 2 scenarios again to ensure there are no discrepancies. 


这篇关于Azure策略未阻止NSG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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