Allowing unrestricted, public access to cloud services could open an application up to external attack. Disallowing this access is typically considered best practice.
In Azure Console -
In Terraform -
References:
https://learn.microsoft.com/en-us/azure/virtual-network/network-overview?context=%2Fazure%2Fvirtual-machines%2Fcontext%2Fcontext#network-interfaces
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_virtual_machine
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface