diff --git a/ibm/service/power/data_source_ibm_pi_instance.go b/ibm/service/power/data_source_ibm_pi_instance.go index faa7f7b2511..0ee20ee1272 100644 --- a/ibm/service/power/data_source_ibm_pi_instance.go +++ b/ibm/service/power/data_source_ibm_pi_instance.go @@ -161,6 +161,11 @@ func DataSourceIBMPIInstance() *schema.Resource { Description: "The procurement type of the instance. Supported values are shared and dedicated.", Type: schema.TypeString, }, + Attr_ServerName: { + Computed: true, + Description: "The name of the instance.", + Type: schema.TypeString, + }, Attr_SharedProcessorPool: { Computed: true, Description: "The name of the shared processor pool for the instance.", @@ -235,6 +240,7 @@ func dataSourceIBMPIInstancesRead(ctx context.Context, d *schema.ResourceData, m d.Set(Attr_PinPolicy, powervmdata.PinPolicy) d.Set(Attr_Processors, powervmdata.Processors) d.Set(Attr_ProcType, powervmdata.ProcType) + d.Set(Attr_ServerName, powervmdata.ServerName) d.Set(Attr_SharedProcessorPool, powervmdata.SharedProcessorPool) d.Set(Attr_SharedProcessorPoolID, powervmdata.SharedProcessorPoolID) d.Set(Attr_Status, powervmdata.Status) diff --git a/ibm/service/power/data_source_ibm_pi_instances.go b/ibm/service/power/data_source_ibm_pi_instances.go index 60ba597ed09..f37b03be3fc 100644 --- a/ibm/service/power/data_source_ibm_pi_instances.go +++ b/ibm/service/power/data_source_ibm_pi_instances.go @@ -141,6 +141,11 @@ func DataSourceIBMPIInstances() *schema.Resource { Description: "The unique identifier of the instance.", Type: schema.TypeString, }, + Attr_ServerName: { + Computed: true, + Description: "The name of the instance.", + Type: schema.TypeString, + }, Attr_SharedProcessorPool: { Computed: true, Description: "The name of the shared processor pool for the instance.", @@ -225,6 +230,7 @@ func flattenPvmInstances(list []*models.PVMInstanceReference) []map[string]inter Attr_Processors: *i.Processors, Attr_ProcType: *i.ProcType, Attr_PVMInstanceID: *i.PvmInstanceID, + Attr_ServerName: i.ServerName, Attr_SharedProcessorPool: i.SharedProcessorPool, Attr_SharedProcessorPoolID: i.SharedProcessorPoolID, Attr_Status: *i.Status, diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index d564ce2586e..c06f0b7d80d 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -181,28 +181,29 @@ const ( Attr_ResultsVolumeOnboardingFailures = "results_volume_onboarding_failures" Attr_SPPPlacementGroups = "spp_placement_groups" Attr_SSHKey = "ssh_key" + Attr_ServerName = "server_name" Attr_Shareable = "shreable" Attr_SharedCoreRatio = "shared_core_ratio" Attr_SharedProcessorPool = "shared_processor_pool" - Attr_SharedProcessorPoolID = "shared_processor_pool_id" - Attr_SharedProcessorPoolPlacementGroups = "spp_placement_groups" - Attr_SharedProcessorPoolStatus = "status" - Attr_SharedProcessorPools = "shared_processor_pools" - Attr_SharedProcessorPoolName = "name" - Attr_SharedProcessorPoolHostID = "host_id" - Attr_SharedProcessorPoolReservedCores = "reserved_cores" - Attr_SharedProcessorPoolAvailableCores = "available_cores" Attr_SharedProcessorPoolAllocatedCores = "allocated_cores" - Attr_SharedProcessorPoolStatusDetail = "status_detail" - Attr_SharedProcessorPoolInstances = "instances" - Attr_SharedProcessorPoolInstanceCpus = "cpus" - Attr_SharedProcessorPoolInstanceUncapped = "uncapped" + Attr_SharedProcessorPoolAvailableCores = "available_cores" + Attr_SharedProcessorPoolHostID = "host_id" + Attr_SharedProcessorPoolID = "shared_processor_pool_id" Attr_SharedProcessorPoolInstanceAvailabilityZone = "availability_zone" + Attr_SharedProcessorPoolInstanceCpus = "cpus" Attr_SharedProcessorPoolInstanceId = "id" Attr_SharedProcessorPoolInstanceMemory = "memory" Attr_SharedProcessorPoolInstanceName = "name" Attr_SharedProcessorPoolInstanceStatus = "status" + Attr_SharedProcessorPoolInstanceUncapped = "uncapped" Attr_SharedProcessorPoolInstanceVcpus = "vcpus" + Attr_SharedProcessorPoolInstances = "instances" + Attr_SharedProcessorPoolName = "name" + Attr_SharedProcessorPoolPlacementGroups = "spp_placement_groups" + Attr_SharedProcessorPoolReservedCores = "reserved_cores" + Attr_SharedProcessorPoolStatus = "status" + Attr_SharedProcessorPoolStatusDetail = "status_detail" + Attr_SharedProcessorPools = "shared_processor_pools" Attr_Size = "size" Attr_SourceVolumeName = "source_volume_name" Attr_Speed = "speed" diff --git a/website/docs/d/pi_instance.html.markdown b/website/docs/d/pi_instance.html.markdown index 09b881eec64..7bb3db01300 100644 --- a/website/docs/d/pi_instance.html.markdown +++ b/website/docs/d/pi_instance.html.markdown @@ -71,6 +71,7 @@ In addition to all argument reference list, you can access the following attribu - `placement_group_id`- (String) The ID of the placement group that the instance is a member. - `processors` - (Float) The number of processors that are allocated to the instance. - `proctype` - (String) The procurement type of the instance. Supported values are `shared` and `dedicated`. +- `server_name` - (String) The name of the instance. - `shared_processor_pool`- (String) The name of the shared processor pool for the instance. - `shared_processor_pool_id` - (String) The ID of the shared processor pool for the instance. - `status` - (String) The status of the instance. diff --git a/website/docs/d/pi_instances.html.markdown b/website/docs/d/pi_instances.html.markdown index 504f0372527..b03dc62a768 100644 --- a/website/docs/d/pi_instances.html.markdown +++ b/website/docs/d/pi_instances.html.markdown @@ -65,6 +65,7 @@ In addition to all argument reference list, you can access the following attribu - `processors` - (Float) The number of processors that are allocated to the instance. - `proctype` - (String) The procurement type of the instance. Supported values are `shared` and `dedicated`. - `pvm_instance_id` - (String) The unique identifier of the instance. + - `server_name` - (String) The name of the instance. - `shared_processor_pool`- (String) The name of the shared processor pool for the instance. - `shared_processor_pool_id` - (String) The ID of the shared processor pool for the instance. - `status` - (String) The status of the instance.