Can you elaborate on "it stopped working"? My guess is that moving files from a Compute Engine instance to Google Drive would be considered network egress ... i.e. moving data out of your VPC network to which your Compute Engine is attached to Google Drive which is an Internet exposed service.
Thanks for your reply. It turns out that traffic through the Google Drive desktop app will also be considered as traffic to the Internet and therefore paid. Could you please tell me how I can send files from the VM instance (windows-server-2022) to google drive for free?
I think I figured out why Google Drive Desk app didn't work. It is necessary to disconnect and connect the account every time when starting the VM image, it is noteworthy that reinstalling the app does not help.
I was able to find a support ticket where a customer asked a similar to question to your own. The answer to that was:
I was able to get an update from our Specialized team. The have confirmed that Google Drive is not part of the Google Cloud Platform and there are no special instructions or integrations other than the network pricing
From this I understand the answer to be that there is no recipe to send data/files from a Google Cloud Compute Engine VM to Google Drive without incurring a network egress charge from the Compute Engine billed at the standard data egress rate.
It seems that traffic through the Google Drive app goes through the internal IP, and therefore probably for free.
The documentation says:
Egress to specific Google products such as Gmail, YouTube, Google Maps, DoubleClick , and Google Drive, whether from a VM in Google Cloud with an external IP address or an internal IP address. - No charge