The resource was not found

460 views
Skip to first unread message

Jay Desai

unread,
Sep 29, 2016, 5:18:31 PM9/29/16
to gce-discussion
Hi,

I've been trying to add an external static IP to my instance, but I get an error while adding forwarding-rule.

Command:-

gcloud compute forwarding-rules create some_rule_name --address unassigned-reserved-static-ip*** --ports 80- --target-instance instance-name

*** - is a regional IP address of zone europe-west1 (same region as instance)

Output:-

ERROR: (gcloud.compute.forwarding-rules.create) Some requests did not succeed: - The resource 'projects/example-project-1234/zones/europe-west1-c/targetInstances/instance-name' was not found

I also checked for multiple logins with gcloud auth list, everything seems fine.

Thanks
The resource 'projects/primeval-falcon-137423/zones/europe-west1-c/targetInstances/pbx-2' was not fo
The resource 'projects/primeval-falcon-137423/zones/europe-west1-c/targetInstances/pbx-2' was not found
The resource 'projects/primeval-falcon-137423/zones/europe-west1-c/targetInstances/pbx-2' was not found

Kamran (Google Cloud Support)

unread,
Sep 29, 2016, 9:09:50 PM9/29/16
to gce-dis...@googlegroups.com
Hello Jay,

The --target-instance flag in gcloud compute forwarding-rules create command has to point to a target instance. For creating a target instance from a single VM you can use gcloud compute target-instances create command. Please visit this article for some examples of these commands.

I hope this helps.

Sincerely,
Reply all
Reply to author
Forward
0 new messages