Gerry
Gerry

Reputation: 63

Promote ephemeral IP to static?

I have setup a compute engine VM instance with an ephemeral ip address and would like to make sure that it keeps the IP address, how can I achieve this?

Is there a way to promote the current assigned IP address to static?

I've found some info through google, but that seems to setup a new address for the server, not the current IP address.

Upvotes: 6

Views: 4771

Answers (2)

dhanabalan Rangasamy
dhanabalan Rangasamy

Reputation: 339

GCloud command to change ephemeral to static:

gcloud compute addresses create ADDRESS_NAME \
  --addresses IP \
  --region REGION_NAME

Reference:

https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#promote_ephemeral_ip

Upvotes: 0

RLHawk
RLHawk

Reputation: 476

According to their documentation, simply go to Networking -> External IP addresses and change the type column to "Static". I've done this myself and it simply makes the same IP address static.

NOTE: You will be charged for the IP addresses that you do not allocate to instances.

Upvotes: 8

Related Questions