Expose SelfLink for GCE instances to allow other resources to reference instances.

This commit is contained in:
David Watson 2015-02-02 09:46:35 +00:00
parent 2d9dd25493
commit 4ec0c34794
1 changed files with 7 additions and 0 deletions

View File

@ -193,6 +193,11 @@ func resourceComputeInstance() *schema.Resource {
Type: schema.TypeString, Type: schema.TypeString,
Computed: true, 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("tags_fingerprint", instance.Tags.Fingerprint)
} }
d.Set("self_link", instance.SelfLink)
return nil return nil
} }