MongoDB on GCP without MongoDB Atlas

Hi, I’m new to Terraform and struggle setting up a MongoDB Replica Set on GCP.
Without Terraform, the easiest way would probably be to use e.g. the Bitnami MongoDB Replica Set on the GCE Marketplace. As far as I know, it is currently not possible (paradigm wise also not intended) to be able to create a VM based on a Marketplace Template using Terraform.
I know the straight forward way would be to use to use MongoDB Atlas incl. the special Provider for it, but I don’t want to do that for now…

I tried to create my own dockerized MongoDB Replica Set on GCE, but ran into quite a few challenges… One learning from that, that I want to share is to use the Equivalent “REST” Button on GCP, it often gives hints on how to rebuild something with Terraform, especially meta-data and things like gce-container-declaration.

Does anyone has experience with configuring MongoDB Replica Sets using Terraform on GCP or has any tips what the easiest way would be? I can’t find a lot of information on that and struggle…