From bbadddc9281f371be736a229debbe9109a1ddf0a Mon Sep 17 00:00:00 2001 From: Ondrej Ezr Date: Mon, 9 Oct 2023 19:47:46 +0200 Subject: [PATCH] feat(HMS-2440): private IPv4 address for GCP --- internal/clients/http/gcp/gcp_client.go | 1 + scripts/rest_examples/reservation-create-gcp.http | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/clients/http/gcp/gcp_client.go b/internal/clients/http/gcp/gcp_client.go index 9fea6c74..09c140c3 100644 --- a/internal/clients/http/gcp/gcp_client.go +++ b/internal/clients/http/gcp/gcp_client.go @@ -316,6 +316,7 @@ func (c *gcpClient) GetInstanceDescriptionByID(ctx context.Context, id, zone str instanceId := strconv.FormatUint(instance.GetId(), 10) instanceDesc := clients.InstanceDescription{ID: instanceId} for _, n := range instance.NetworkInterfaces { + instanceDesc.PrivateIPv4 = *n.NetworkIP if len(n.AccessConfigs) > 0 && n.AccessConfigs[0] != nil { instanceDesc.IPv4 = *n.AccessConfigs[0].NatIP break diff --git a/scripts/rest_examples/reservation-create-gcp.http b/scripts/rest_examples/reservation-create-gcp.http index d89b77b7..a5643751 100644 --- a/scripts/rest_examples/reservation-create-gcp.http +++ b/scripts/rest_examples/reservation-create-gcp.http @@ -10,7 +10,6 @@ X-Rh-Identity: {{identity}} "image_id": "https://www.googleapis.com/compute/v1/projects/rhel-cloud/global/images/rhel-9-v20230411", "amount": 1, "machine_type": "e2-micro", - "launch_template_id": "{{launch_template_id}}", "pubkey_id": {{pubkey_id}}, "poweroff": true }