Quentin123345 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud compute cannot always refer to IP address by name #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

$ gcloud compute instances create --address name-of-ip-address

What is the expected output? What do you see instead?

ERROR: (gcloud.compute.instances.create) Some requests did not succeed:
 - Invalid value for field 'resource.networkInterfaces[0].accessConfigs[0].natIP': 'name-of-ip-address'.  Must be an IP address

I expected the command to take the name of the IP address, just like the 
addresses command below. This would make scripting certain things a lot easier, 
as static IP addresses could then be referred to by name in the script. Now I 
have to do a lookup using the describe command and extract the actual IP from 
the output before using it in the create command.

$ gcloud compute addresses describe name-of-ip-address
address: 1.1.1.1
creationTimestamp: '2014-10-02T07:08:14.154-07:00'
description: ''
id: '111111111111'
kind: compute#address
name: name-of-ip-address
region: 
https://www.googleapis.com/compute/v1/projects/swipe-app/regions/europe-west1
selfLink: 
https://www.googleapis.com/compute/v1/projects/swipe-app/regions/europe-west1/ad
dresses/name-of-ip-address
status: RESERVED

What is the output of 'gcloud info'?
compute: [2014.08.14]

Original issue reported on code.google.com by haakone...@gmail.com on 2 Oct 2014 at 3:34

GoogleCodeExporter commented 8 years ago
This will be fixed in the next gcloud release.

Original comment by dcarl...@google.com on 5 Nov 2014 at 9:27

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 10 Nov 2014 at 4:36

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 10 Nov 2014 at 4:37