Reputation: 3
I'm being billed for Google Compute Engine usage that I'm really not. When I delete or stop instances they are recreated/restarted automatically somehow.
Is it possible to disable GCE from being billed without affecting GAE?
EDIT: A detail I initially didn't include is that it is a Ruby on Rails application. As highlighted in the correct answer, Rails apps will use GCE flexible environment VM instances. This wasn't obvious to me. Hope this information helps someone else getting started on GCP.
Upvotes: 0
Views: 311
Reputation: 41100
Flexible runtime will continue to create Compute Engine instances as long as there is a deployed service configured to flexible runtime. Either change the configuration files, or simply remove this service, and no more instances will be created.
Upvotes: 0
Reputation: 996
Billing settings can only be enabled per project. There are some spending limits that can be set on GAE, but you will not be able to disable billing for only GCE.
There are several different scenarios where VMs can be recreated. Usually this will happens if a VM is part of a Managed Instance Group. Part of the responsibilities of this entity is to recreate unhealthy instances. If you directly delete a VM and it belongs to a managed group, it will get recreated.
There are several products in GCP that might create instance managed groups. As an example GKE nodes will live inside one. For this specific case the right way to go is deleting the GKE cluster.
As per the previous answers GAE flex environment use GCE resources. If you delete the VMs directly in the GCE side they will get recreated. As explained the right way to get rid of those resources is from the GAE side. I believe there are other products like Datalab that might also spin GCE VMs. The approach would still be the same.
Sometimes the name of the VM might help you understand which product is being used. As an example GKE nodes has names like gke-xxxxxx and GAE gae-xxxx. If the VM you are trying to delete does just have a plain name, it might be that you manually included the instance in an managed group or that you enabled autoscaler. In that case, you must exclude the VM from the instance managed group or if convenient delete the managed group.
Upvotes: -1
Reputation: 6851
It sounds like you've deployed an App Engine flexible environment app, which resides on Compute Engine instances, but are managed by App Engine.
If you are in fact running a flexible environment instance, then you should be getting billed for your usage. If you are running a supported language for the standard environment (Java 7, Python 2.7, Go, PHP 5.5), then you should consider deploying there instead, but you might have to rewrite some portions of your app depending on how you set it up and what libraries are used.
Upvotes: 0