Skip to content

Commit

Permalink
feat(HMS-2440): private IPv4 address for GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
ezr-ondrej committed Oct 9, 2023
1 parent 49fe2a6 commit bbadddc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions internal/clients/http/gcp/gcp_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion scripts/rest_examples/reservation-create-gcp.http
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit bbadddc

Please sign in to comment.