Google Cloud SQL "Idling IP Address"
Asked Answered
C

4

17

I have been looking at the console’s billing as far as Cloud SQL and the VM Instance is concerned. I see that a lot of the cost comes from the idling hours of the Cloud SQL IP address. I am unsure as to where the settings are for this as i have tried to “unassign” the ip address that is associated with my Cloud SQL Instance. Are these charges static, as in am I always, no matter what, going to be charged for the ip address constantly or is there a way to turn this off when I am not using the Cloud SQL Instance? If so, how can I?

Chervil answered 11/8, 2014 at 18:19 Comment(1)
The IP address will always be charged when the instance is not running. You can unassign an IP address to prevent this idle charge.Procarp
D
10

You will be charged $0.01 for every hour the instance is not active and has an IPv4 address assigned. You can un-assign IP address using the Google Developers Console, go to your Cloud SQL instance, click on Edit and uncheck 'Assign an IPv4 address to my Cloud SQL instance' box.

Doerrer answered 15/12, 2014 at 0:14 Comment(5)
Ironically the cost for IP idling is greater than the cost of leaving a small instance (e.g. SQL) running. The cost for the idling comes as a surprise and there is no obvious way to unassign the IP address for an unused instance. Google should make this more transparent.Longwise
This no longer seems to work in the current GCP console. Where might one find the option to remove the assigned IP address short of deleting the cloud SQL instance?Longwise
Paging Kamran. Is this no longer possible?Stinger
There doesn't seem to be an option "Assign an IPv4 address..."Cologarithm
There's not a chance to disable Public IP Address, Google doesn't allow to save changes once you uncheck "Public IP". I guess that's how Google makes profit from all GCP users.Gradin
O
4

Click your SQL instance to go to Instance details > Connections > Public IP - uncheck it.

https://cloud.google.com/sql/docs/mysql/configure-ip

Note: When you disable public IP for an instance, you release its IPv4 address. If you later reenable public IP for this instance, it will get a different IPv4 address, and all applications that use the public IP address to connect to this instance must be modified.

Basically if you remove the public connection to your instance the IP is released too.

Orinasal answered 3/6, 2019 at 22:1 Comment(1)
But it is asking to select at least 1 option public or privateHoye
B
3

A lot of answers, most of them partial (or old?), it seems. On top, Google's settings aren't very transparent either. I checked in early 2020 and it doesn't seem possible to switch off the IP address or avoid the charges on a stopped instance.

In more detail:

  • I was billed €6.55 for 600 hours of SKU IP address idling in seconds for DB
  • The Cloud SQL instance in question was turned off (most or all of) the month of December until right now
  • Both Private IP and Public IP were deselected under [Google Cloud Project] > SQL > Connections

I then started the instance; no IP selected still. I let it run for some minutes and stopped it.

  • In the instances overview (only visible when switching from some other section like Logging back to [Google Cloud Project] > SQL), there was an IP listed under Public IP Address now
  • In [Google Cloud Project] > SQL > Connections, Public IP was selected (I didn't select anything there!)

Starting the instance now doesn't let me deselect both IP address options at the same time anymore like I had it before.

I do have a number of Authorized Networks configured under option Public IP and used these in some earlier months. I cannot test whether removing all if these will let me disable the option right now, as I need them again real soon. So, that's an open question.

In summary, besides a glitch in the system where no IP address option is selected, yet one is set up anyways, the charge seems to be unavoidable for a non-running instance. It's not possible to switch the IP off as @Tony Tseng suggested.

Why is that again, Google?

Blooper answered 2/1, 2020 at 16:57 Comment(2)
Did you check my solution too?Orinasal
As I said, it's not possible to just uncheck the public IP. The UI requires you to have one of the two options selected, and you don't want to switch on the private IP (and if only because of the warning that this cannot be undone).Blooper
A
0

https://cloud.google.com/sql/docs/mysql/configure-ip

Click the instance name to open its Instance details page.
Select the Connections tab.
Deselect the Public IP checkbox.
Click Save to update the instance.==> Save is disabled on unchecking Public IP checkbox. Looks like either Private IP or Public IP checkbox should be selected to enable Save button.

Amputee answered 4/11, 2019 at 10:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.