'Allow-IAP Firewall Rule created in default VPC in GCP getting reflected in other VPC as well

I have a below firewall rule created in default VPC. It is configured to be applicable to all the instances in the VPC.

Firewall Rule to allow-ingress-from-iap in default VPC

Now, If I remove "all" from ports, I start getting below warning for all the VMs in IAP console. which is okay as per the reference below https://stackoverflow.com/a/62635234/10580233

IAP warning when firewall rule has only 22 and 3389 port mentioned

the issue is , when I configure "all" for firewall in default VPC even the warning for VMs which are outside in default VPC is getting disappeared. Are the IAP firewall rules are applied across the projects, which I do not think so. I have allow-ingress-from-iap firewall rule configured in other VPC as well but it is with only 22 and 3389 ports so ideally IAP should show warning for them.

allow-iap rule for default and customized vpc



Solution 1:[1]

allow tcp 22 port for ssh protocol in firewall rule.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user3239402