From 4ec0c347948331edb52043983d8f0c2da20ad379 Mon Sep 17 00:00:00 2001 From: David Watson Date: Mon, 2 Feb 2015 09:46:35 +0000 Subject: [PATCH] Expose SelfLink for GCE instances to allow other resources to reference instances. --- builtin/providers/google/resource_compute_instance.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builtin/providers/google/resource_compute_instance.go b/builtin/providers/google/resource_compute_instance.go index 33664f013..0b05f9238 100644 --- a/builtin/providers/google/resource_compute_instance.go +++ b/builtin/providers/google/resource_compute_instance.go @@ -193,6 +193,11 @@ func resourceComputeInstance() *schema.Resource { Type: schema.TypeString, Computed: true, }, + + "self_link": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -441,6 +446,8 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error d.Set("tags_fingerprint", instance.Tags.Fingerprint) } + d.Set("self_link", instance.SelfLink) + return nil }