Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename reserved IP Address in GCE

Is it possible to rename an existing reserved IP address without having to release it?

Its just to aid administration within a project where the reserved IP name doesn't match the registered DNS name of the instance that its attached to

like image 605
mobcdi Avatar asked Oct 28 '25 09:10

mobcdi


2 Answers

This is possible if you rename it whilst moving it to a different Project and move it back again https://cloud.google.com/vpc/docs/move-ip-address-different-project


First move the IP address to another GCP project (just create a temporary project if you don't have more than one already):

gcloud compute addresses move OLD_IP_NAME_HERE --project=PROJECT_ID --target-project=TEMP_PROJECT_ID --global

Then move the IP address back, setting a new name at the same time:

gcloud compute addresses move OLD_IP_NAME_HERE --new-name=NEW_IP_NAME_HERE --project=TEMP_PROJECT_ID --target-project=PROJECT_ID --global
like image 102
Tim D Avatar answered Oct 31 '25 10:10

Tim D


According to the latest GCE API, it is not possible to rename an address object.

like image 42
Alexander Gaysinsky Avatar answered Oct 31 '25 11:10

Alexander Gaysinsky