Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I take it that, by "subnet associated to the azure firewall" - you mean to say you attach a UDR to this subnet that routes traffic to the Azure Firewall.
Unfortunately, this won't be feasible.
- A UDR is attached to a subnet and all the VMs in this subnet must abide by the effective routing at Subnet Level
- A single VM in a subnet cannot override the UDR specified at Subnet level
What you can instead do is,
- Create Rules in the Firewall so that these VMs' traffic are always allowed (not inspected)
Kindly let us know if this helps or you need further assistance on this issue.
Thanks,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.