Add a url attribute to google_storage_bucket (#14393)

* Add a `url` attribute to `google_storage_bucket`

* Document the `url` attribute
This commit is contained in:
Daniel Schierbeck 2017-05-11 14:30:06 +02:00 committed by Paul Stack
parent f034eb533c
commit 0b161db410

View File

@ -58,6 +58,11 @@ func resourceStorageBucket() *schema.Resource {
Computed: true,
},
"url": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"storage_class": &schema.Schema{
Type: schema.TypeString,
Optional: true,
@ -151,6 +156,7 @@ func resourceStorageBucketCreate(d *schema.ResourceData, meta interface{}) error
// Assign the bucket ID as the resource ID
d.Set("self_link", res.SelfLink)
d.Set("url", fmt.Sprintf("gs://%s", bucket))
d.SetId(res.Id)
return nil