Is there a way to automatically update the type of a compute engine instance?

93 views
Skip to first unread message

Vinícius Fernandes

unread,
Dec 23, 2020, 12:29:17 PM12/23/20
to gce-discussion

Hi there,

I have a single g1-small machine running WordPress and I would like to know if there's a way to update it automatically to f1-micro using scripts or another GCP resource in predefined time ranges.

I want to do it to reduce costs in time ranges that I don't receive much traffic.

Regards,

Lucas (Cloud Platform Support)

unread,
Dec 23, 2020, 5:20:39 PM12/23/20
to gce-discussion
Hello,

You can manually change the machine type of an instance [1], but only when it is stopped.

For an automatic update, here is a guide on how to do it but for a MIG [2]. It would work the same way as without the MIG. You can do so using instance templates and configure the automatic update the way you want it to be set up.

I hope this answers your question.

[1] https://cloud.google.com/compute/docs/instances/changing-machine-type-of-stopped-instance
[2] https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups
Reply all
Reply to author
Forward
0 new messages