Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I release static internal IP address which I reserved by mistake?

I would like to create new instance on Google Cloud Compute Engine with static external IP, but I create new static internal IP by mistake as below photo.

static internal IP at Create an instance

Could you tell me how to release it?

like image 918
Jiyu Komiya Avatar asked Oct 04 '18 11:10

Jiyu Komiya


1 Answers

The static internal IP addresses can be deleted by using several methods, such as the VM instances page, the gcloud tool or sending a DELETE API call, as mentioned in the Deleting a static internal IP address public documentation. Based on this, I suggest you to follow one of the options listed below, as well as take a look on this link, to know more about the process required to assign a static external IP address to a new VM instance.

Console

  1. Go to the VM instances page.
  2. Select your project.
  3. Select the VM instance from the project list.
  4. Select the Edit tool at the top of the page.
  5. Click the edit tool for Network Interfaces.
  6. Change the Internal IP type from Static to Ephemeral.
  7. Select Release to release your static IP address.
  8. Click Done to save your changes.

Gcloud tool

Using the gcloud tool, run the compute addresses delete command:

  • gcloud compute addresses delete [ADDRESS_NAME] --region [REGION]

API

In the API, make a DELETE request to the following URL:

  • DELETE https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/regions/[REGION]/addresses/[ADDRESS_NAME]
like image 71
Armin_SC Avatar answered Oct 05 '22 09:10

Armin_SC