diff --git a/go.mod b/go.mod index 2fa1653dd8..5cd4d4e067 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.12 require ( github.com/Bowery/prompt v0.0.0-20190916142128-fa8279994f75 // indirect - github.com/IBM-Cloud/bluemix-go v0.0.0-20200618045128-dcf70b676caf + github.com/IBM-Cloud/bluemix-go v0.0.0-20200714095434-4dd1df3322eb github.com/IBM-Cloud/power-go-client v1.0.37 github.com/IBM/apigateway-go-sdk v0.0.0-20200414212859-416e5948678a github.com/IBM/dns-svcs-go-sdk v0.0.3 diff --git a/go.sum b/go.sum index c318443e88..9e5b3055b0 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/IBM-Cloud/bluemix-go v0.0.0-20200603114620-c69c94b21ee0 h1:ewa2N9UTJN github.com/IBM-Cloud/bluemix-go v0.0.0-20200603114620-c69c94b21ee0/go.mod h1:gPJbH1etcDj7qS/hBRiLuYW9CY0bRcostSKusa51xR0= github.com/IBM-Cloud/bluemix-go v0.0.0-20200618045128-dcf70b676caf h1:s/1pbrFoZkt3xSxQFSnG1TFabt+MNBaTAzenkXsonE4= github.com/IBM-Cloud/bluemix-go v0.0.0-20200618045128-dcf70b676caf/go.mod h1:gPJbH1etcDj7qS/hBRiLuYW9CY0bRcostSKusa51xR0= +github.com/IBM-Cloud/bluemix-go v0.0.0-20200714095434-4dd1df3322eb h1:dGe0hrdSE5QtWkOaOzW8wTwzn1xvhYUAdWvvWmkn+eE= +github.com/IBM-Cloud/bluemix-go v0.0.0-20200714095434-4dd1df3322eb/go.mod h1:gPJbH1etcDj7qS/hBRiLuYW9CY0bRcostSKusa51xR0= github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.6.7/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs= github.com/IBM-Cloud/power-go-client v1.0.0 h1:iy7ElG6CmCYOeRal07JMGtIvby0qOKBPPL9Wuf1Oo4E= github.com/IBM-Cloud/power-go-client v1.0.0/go.mod h1:+mOxjyLeLIloR4EMHTpiDbN+FilZpiVHTwu5eqi+cbI= diff --git a/ibm/data_source_ibm_resource_instance.go b/ibm/data_source_ibm_resource_instance.go index 8c815edf62..416891c13c 100644 --- a/ibm/data_source_ibm_resource_instance.go +++ b/ibm/data_source_ibm_resource_instance.go @@ -88,6 +88,12 @@ func dataSourceIBMResourceInstance() *schema.Resource { Computed: true, Description: "The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource", }, + + "extensions": { + Type: schema.TypeMap, + Computed: true, + Description: "The extended metadata as a map associated with the resource instance.", + }, }, } } @@ -187,6 +193,9 @@ func dataSourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{}) d.Set(ResourceCRN, instance.Crn.String()) d.Set(ResourceStatus, instance.State) d.Set(ResourceGroupName, instance.ResourceGroupName) + if instance.Extensions != nil { + d.Set("extensions", instance.Extensions) + } rcontroller, err := getBaseController(meta) if err != nil { diff --git a/ibm/resource_ibm_resource_instance.go b/ibm/resource_ibm_resource_instance.go index fa930bc538..b679124c13 100644 --- a/ibm/resource_ibm_resource_instance.go +++ b/ibm/resource_ibm_resource_instance.go @@ -154,6 +154,12 @@ func resourceIBMResourceInstance() *schema.Resource { Computed: true, Description: "The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource", }, + + "extensions": { + Type: schema.TypeMap, + Computed: true, + Description: "The extended metadata as a map associated with the resource instance.", + }, }, } } @@ -344,6 +350,9 @@ func resourceIBMResourceInstanceRead(d *schema.ResourceData, meta interface{}) e d.Set("service_endpoints", endpoint) } } + if instance.Extensions != nil { + d.Set("extensions", instance.Extensions) + } return nil } diff --git a/website/docs/d/resource_instance.html.markdown b/website/docs/d/resource_instance.html.markdown index 44ab024046..3408f45a28 100644 --- a/website/docs/d/resource_instance.html.markdown +++ b/website/docs/d/resource_instance.html.markdown @@ -45,3 +45,4 @@ The following attributes are exported: * `id` - The unique identifier of the resource instance. * `status` - The status of resource instance. * `plan` - The plan for the service offering used by this resource instance. +* `extensions` - The extended metadata as a map associated with the resource instance. diff --git a/website/docs/r/resource_instance.html.markdown b/website/docs/r/resource_instance.html.markdown index 4b4e45bbe7..43e2b0dd5f 100644 --- a/website/docs/r/resource_instance.html.markdown +++ b/website/docs/r/resource_instance.html.markdown @@ -68,3 +68,5 @@ The following attributes are exported: * `status` - Status of resource instance. * `guid`- Guid of the resource instance. * `dashboard_url`- The dashboard url of the new resource instance. +* `extensions` - The extended metadata as a map associated with the resource instance. +