Azure Network Security Group Auto Updates / Resets

Glenn 1 Reputation point
2021-11-17T22:35:59.99+00:00

I have a AKS three node cluster and in its network security group, I added (which i have done a number of times now) i list of IPs allowed to access the service.

However, Azure keeps resetting these for no reason what so ever. I have not updated / moved or changed this resource in any way, I have been building other resources, e.g. VMs to host other content. But this service has never been changed or edited by me, with either terrafrom, the CLI or the portal.

This was not set inside my terrafrom, but from the portal - mostly due to not knowing all the IPs I needed to add. But this terrafrom build has never been re-run to reset this?

Newer builds have been run to create complete new resources / resource groups, to the same account but not to this resource / group?

So why is my allow source IP list resetting / changing all the time?

Should I added the allowed IPs in my terrafrom and apply the update? Would that set it correctly, e.g. no reset?

I also get no warming that its been done - so i don't know when my hosted services are public

Thanks,

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,667 questions
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,286 Reputation points Microsoft Employee
    2021-11-18T04:33:45.643+00:00

    @Glenn ,

    I would suggest you to check your activity logs to verify if there is a log for this change. If you find one, check which user/service principle is making this change.

    Also, if you have enabled something like JIT, it will modify the source IP in your NSG. Check if you have JIT enabled.

    Let me know if you have any questions.

    Regards,
    Karthik Srinivas


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.