diff --git a/vsphere/data_source_vsphere_content_library_item.go b/vsphere/data_source_vsphere_content_library_item.go index 7d0d07847..6bd551751 100644 --- a/vsphere/data_source_vsphere_content_library_item.go +++ b/vsphere/data_source_vsphere_content_library_item.go @@ -20,7 +20,13 @@ func dataSourceVSphereContentLibraryItem() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "ID of the content library to contain item", + Description: "ID of the content library to contain item.", + }, + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: "Type of content library item.", }, }, } @@ -33,6 +39,7 @@ func dataSourceVSphereContentLibraryItemRead(d *schema.ResourceData, meta interf if err != nil { return provider.ProviderError(d.Get("name").(string), "dataSourceVSphereContentLibraryItemRead", err) } + d.Set("type", item.Type) d.SetId(item.ID) return nil } diff --git a/website/docs/d/content_library_item.html.markdown b/website/docs/d/content_library_item.html.markdown index a517e6962..b75293420 100644 --- a/website/docs/d/content_library_item.html.markdown +++ b/website/docs/d/content_library_item.html.markdown @@ -37,6 +37,5 @@ The following arguments are supported: ## Attribute Reference -The only attribute this resource exports is the `id` of the resource, which is -a combination of the [managed object reference ID][docs-about-morefs] of the -cluster, and the name of the virtual machine group. +* `id` - The UUID of the Content Library item. +* `type` - The Content Library type. Can be ovf, iso, or vm-template. diff --git a/website/vsphere.erb b/website/vsphere.erb index 69da9d62a..e65051f31 100644 --- a/website/vsphere.erb +++ b/website/vsphere.erb @@ -16,6 +16,12 @@ > vsphere_compute_cluster + > + vsphere_content_library + + > + vsphere_content_library_item + > vsphere_custom_attribute