diff --git a/go.mod b/go.mod index 05db3be..d1d768d 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,14 @@ module github.com/hewlettpackard/hpegl-metal-terraform-resources -go 1.21.0 +go 1.22.0 + toolchain go1.22.5 require ( github.com/golangci/golangci-lint v1.58.2 github.com/hashicorp/terraform-plugin-docs v0.19.4 github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0 - github.com/hewlettpackard/hpegl-metal-client v1.5.23 + github.com/hewlettpackard/hpegl-metal-client v1.5.24 github.com/hewlettpackard/hpegl-provider-lib v0.0.21 github.com/stretchr/testify v1.9.0 gopkg.in/yaml.v2 v2.4.0 @@ -233,7 +234,7 @@ require ( golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/text v0.19.0 // indirect diff --git a/go.sum b/go.sum index 5e142f1..7d57b6c 100644 --- a/go.sum +++ b/go.sum @@ -389,8 +389,8 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hewlettpackard/hpegl-metal-client v1.5.23 h1:EQuYg4qGpUUF11hNYqb3ekzUKgqIfQd2RNg1Y3SCGqc= -github.com/hewlettpackard/hpegl-metal-client v1.5.23/go.mod h1:+BO4BfQXf3IWnsxvk2IdE27Ijrm1jDVYIgpebYh1L9M= +github.com/hewlettpackard/hpegl-metal-client v1.5.24 h1:x9UgKqw3nZ2LG45iEFqtAkXM7Ghg5R1xwEHXPDgE2FQ= +github.com/hewlettpackard/hpegl-metal-client v1.5.24/go.mod h1:DJRxRgIRZf+Wb8soq3RTKh2f3l0KhJLlfUWrY5/twcw= github.com/hewlettpackard/hpegl-provider-lib v0.0.21 h1:35cmYg/UceVtxZHDMCKcEeAGhdJ5rzWi7JRrY/hS0BY= github.com/hewlettpackard/hpegl-provider-lib v0.0.21/go.mod h1:Bw2DhefBjqXQI6s5vBBGiWUkFz7fx4KkbGfwmo9wv3U= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -851,8 +851,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/internal/resources/resource_volume.go b/internal/resources/resource_volume.go index 194d6d1..b305a4a 100644 --- a/internal/resources/resource_volume.go +++ b/internal/resources/resource_volume.go @@ -38,6 +38,8 @@ const ( vCreatedSite = "created_site" vReplicationEnabled = "replication_enabled" vExportCount = "export_count" + vDataCenterName = "data_center_name" + vStoragePoolName = "storage_pool_name" // volume Info constants. vID = "id" @@ -211,6 +213,18 @@ func volumeSchema() map[string]*schema.Schema { Computed: true, Description: "The number of active exports for this volume", }, + + vDataCenterName: { + Type: schema.TypeString, + Computed: true, + Description: "Name of the data center where the volume is created on the storage array.", + }, + + vStoragePoolName: { + Type: schema.TypeString, + Computed: true, + Description: "Name of the storage pool from where the volume is allocated.", + }, } } @@ -404,6 +418,14 @@ func resourceMetalVolumeRead(d *schema.ResourceData, meta interface{}) (err erro return fmt.Errorf("set %s: %v", vExportCount, err) } + if err = d.Set(vDataCenterName, volume.DataCenterName); err != nil { + return fmt.Errorf("set %s: %v", vDataCenterName, err) + } + + if err = d.Set(vStoragePoolName, volume.StoragePoolName); err != nil { + return fmt.Errorf("set %s: %v", vStoragePoolName, err) + } + d.Set(vName, volume.Name) d.Set(vDescription, volume.Description) flavorName, _ := p.GetVolumeFlavorName(volume.FlavorID) diff --git a/version b/version index 02c1916..fe0c4db 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.3.62 +1.3.63