1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiImage
ibm 1.88.0 published on Friday, Feb 6, 2026 by ibm-cloud
ibm logo
ibm 1.88.0 published on Friday, Feb 6, 2026 by ibm-cloud

    Import the details of an existing IBM Power Virtual Server Cloud image as a read-only data source. For more information, about IBM power virtual server cloud, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsImage = ibm.getPiImage({
        piCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        piImageId: "7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_image = ibm.get_pi_image(pi_cloud_instance_id="49fba6c9-23f8-40bc-9899-aca322ee7d5b",
        pi_image_id="7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupPiImage(ctx, &ibm.LookupPiImageArgs{
    			PiCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
    			PiImageId:         pulumi.StringRef("7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var dsImage = Ibm.GetPiImage.Invoke(new()
        {
            PiCloudInstanceId = "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
            PiImageId = "7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetPiImageArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var dsImage = IbmFunctions.getPiImage(GetPiImageArgs.builder()
                .piCloudInstanceId("49fba6c9-23f8-40bc-9899-aca322ee7d5b")
                .piImageId("7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456")
                .build());
    
        }
    }
    
    variables:
      dsImage:
        fn::invoke:
          function: ibm:getPiImage
          arguments:
            piCloudInstanceId: 49fba6c9-23f8-40bc-9899-aca322ee7d5b
            piImageId: 7f8e2a9d-3b4c-4e4f-8e8d-f7e7e1e23456
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    
    {}
    

    Using getPiImage

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPiImage(args: GetPiImageArgs, opts?: InvokeOptions): Promise<GetPiImageResult>
    function getPiImageOutput(args: GetPiImageOutputArgs, opts?: InvokeOptions): Output<GetPiImageResult>
    def get_pi_image(id: Optional[str] = None,
                     pi_cloud_instance_id: Optional[str] = None,
                     pi_image_id: Optional[str] = None,
                     pi_image_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPiImageResult
    def get_pi_image_output(id: Optional[pulumi.Input[str]] = None,
                     pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                     pi_image_id: Optional[pulumi.Input[str]] = None,
                     pi_image_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPiImageResult]
    func LookupPiImage(ctx *Context, args *LookupPiImageArgs, opts ...InvokeOption) (*LookupPiImageResult, error)
    func LookupPiImageOutput(ctx *Context, args *LookupPiImageOutputArgs, opts ...InvokeOption) LookupPiImageResultOutput

    > Note: This function is named LookupPiImage in the Go SDK.

    public static class GetPiImage 
    {
        public static Task<GetPiImageResult> InvokeAsync(GetPiImageArgs args, InvokeOptions? opts = null)
        public static Output<GetPiImageResult> Invoke(GetPiImageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiImageResult> getPiImage(GetPiImageArgs args, InvokeOptions options)
    public static Output<GetPiImageResult> getPiImage(GetPiImageArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiImage:getPiImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The unique identifier of the image.
    PiImageId string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    PiImageName string
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The unique identifier of the image.
    PiImageId string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    PiImageName string
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The unique identifier of the image.
    piImageId String
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    piImageName String
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    id string
    (String) The unique identifier of the image.
    piImageId string
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    piImageName string
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    id str
    (String) The unique identifier of the image.
    pi_image_id str
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    pi_image_name str
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The unique identifier of the image.
    piImageId String
    The ID of the image. To find supported images, run the ibmcloud pi images command.
    piImageName String
    The id of the image. Passing the name of the image could fail or fetch stale data. Please pass an id and use pi_image_id instead.

    Deprecated: Deprecated

    getPiImage Result

    The following output properties are available:

    Architecture string
    (String) The CPU architecture that the image is designed for.
    ContainerFormat string
    (String) The container format.
    Crn string
    (String) The CRN of this resource.
    DiskFormat string
    (String) The disk format.
    Endianness string
    (String) The endianness order.
    Hypervisor string
    (String) Hypervisor type.
    Id string
    (String) The unique identifier of the image.
    ImageType string
    (String) The identifier of this image type.
    Name string
    (String) The volume name of the image.
    OperatingSystem string
    (String) The operating system that is installed with the image.
    PiCloudInstanceId string
    Shared bool
    (String) Indicates whether the image is shared.
    Size double
    (Float) The volume size of the image.
    SourceChecksum string
    (String) Checksum of the image.
    State string
    (String) The state for this image.
    StoragePool string
    (String) Storage pool where image resides.
    StorageType string
    (String) The storage type for this image.
    UserTags List<string>
    (List) List of user tags attached to the resource.
    Volumes List<GetPiImageVolume>
    (List) List of image volumes.
    PiImageId string
    PiImageName string

    Deprecated: Deprecated

    Architecture string
    (String) The CPU architecture that the image is designed for.
    ContainerFormat string
    (String) The container format.
    Crn string
    (String) The CRN of this resource.
    DiskFormat string
    (String) The disk format.
    Endianness string
    (String) The endianness order.
    Hypervisor string
    (String) Hypervisor type.
    Id string
    (String) The unique identifier of the image.
    ImageType string
    (String) The identifier of this image type.
    Name string
    (String) The volume name of the image.
    OperatingSystem string
    (String) The operating system that is installed with the image.
    PiCloudInstanceId string
    Shared bool
    (String) Indicates whether the image is shared.
    Size float64
    (Float) The volume size of the image.
    SourceChecksum string
    (String) Checksum of the image.
    State string
    (String) The state for this image.
    StoragePool string
    (String) Storage pool where image resides.
    StorageType string
    (String) The storage type for this image.
    UserTags []string
    (List) List of user tags attached to the resource.
    Volumes []GetPiImageVolume
    (List) List of image volumes.
    PiImageId string
    PiImageName string

    Deprecated: Deprecated

    architecture String
    (String) The CPU architecture that the image is designed for.
    containerFormat String
    (String) The container format.
    crn String
    (String) The CRN of this resource.
    diskFormat String
    (String) The disk format.
    endianness String
    (String) The endianness order.
    hypervisor String
    (String) Hypervisor type.
    id String
    (String) The unique identifier of the image.
    imageType String
    (String) The identifier of this image type.
    name String
    (String) The volume name of the image.
    operatingSystem String
    (String) The operating system that is installed with the image.
    piCloudInstanceId String
    shared Boolean
    (String) Indicates whether the image is shared.
    size Double
    (Float) The volume size of the image.
    sourceChecksum String
    (String) Checksum of the image.
    state String
    (String) The state for this image.
    storagePool String
    (String) Storage pool where image resides.
    storageType String
    (String) The storage type for this image.
    userTags List<String>
    (List) List of user tags attached to the resource.
    volumes List<GetPiImageVolume>
    (List) List of image volumes.
    piImageId String
    piImageName String

    Deprecated: Deprecated

    architecture string
    (String) The CPU architecture that the image is designed for.
    containerFormat string
    (String) The container format.
    crn string
    (String) The CRN of this resource.
    diskFormat string
    (String) The disk format.
    endianness string
    (String) The endianness order.
    hypervisor string
    (String) Hypervisor type.
    id string
    (String) The unique identifier of the image.
    imageType string
    (String) The identifier of this image type.
    name string
    (String) The volume name of the image.
    operatingSystem string
    (String) The operating system that is installed with the image.
    piCloudInstanceId string
    shared boolean
    (String) Indicates whether the image is shared.
    size number
    (Float) The volume size of the image.
    sourceChecksum string
    (String) Checksum of the image.
    state string
    (String) The state for this image.
    storagePool string
    (String) Storage pool where image resides.
    storageType string
    (String) The storage type for this image.
    userTags string[]
    (List) List of user tags attached to the resource.
    volumes GetPiImageVolume[]
    (List) List of image volumes.
    piImageId string
    piImageName string

    Deprecated: Deprecated

    architecture str
    (String) The CPU architecture that the image is designed for.
    container_format str
    (String) The container format.
    crn str
    (String) The CRN of this resource.
    disk_format str
    (String) The disk format.
    endianness str
    (String) The endianness order.
    hypervisor str
    (String) Hypervisor type.
    id str
    (String) The unique identifier of the image.
    image_type str
    (String) The identifier of this image type.
    name str
    (String) The volume name of the image.
    operating_system str
    (String) The operating system that is installed with the image.
    pi_cloud_instance_id str
    shared bool
    (String) Indicates whether the image is shared.
    size float
    (Float) The volume size of the image.
    source_checksum str
    (String) Checksum of the image.
    state str
    (String) The state for this image.
    storage_pool str
    (String) Storage pool where image resides.
    storage_type str
    (String) The storage type for this image.
    user_tags Sequence[str]
    (List) List of user tags attached to the resource.
    volumes Sequence[GetPiImageVolume]
    (List) List of image volumes.
    pi_image_id str
    pi_image_name str

    Deprecated: Deprecated

    architecture String
    (String) The CPU architecture that the image is designed for.
    containerFormat String
    (String) The container format.
    crn String
    (String) The CRN of this resource.
    diskFormat String
    (String) The disk format.
    endianness String
    (String) The endianness order.
    hypervisor String
    (String) Hypervisor type.
    id String
    (String) The unique identifier of the image.
    imageType String
    (String) The identifier of this image type.
    name String
    (String) The volume name of the image.
    operatingSystem String
    (String) The operating system that is installed with the image.
    piCloudInstanceId String
    shared Boolean
    (String) Indicates whether the image is shared.
    size Number
    (Float) The volume size of the image.
    sourceChecksum String
    (String) Checksum of the image.
    state String
    (String) The state for this image.
    storagePool String
    (String) Storage pool where image resides.
    storageType String
    (String) The storage type for this image.
    userTags List<String>
    (List) List of user tags attached to the resource.
    volumes List<Property Map>
    (List) List of image volumes.
    piImageId String
    piImageName String

    Deprecated: Deprecated

    Supporting Types

    GetPiImageVolume

    Bootable bool
    (Bool) Indicates if the volume is boot capable.
    Name string
    (String) The volume name of the image.
    Size double
    (Float) The volume size of the image.
    VolumeId string
    (String) The volume size of the image.
    Bootable bool
    (Bool) Indicates if the volume is boot capable.
    Name string
    (String) The volume name of the image.
    Size float64
    (Float) The volume size of the image.
    VolumeId string
    (String) The volume size of the image.
    bootable Boolean
    (Bool) Indicates if the volume is boot capable.
    name String
    (String) The volume name of the image.
    size Double
    (Float) The volume size of the image.
    volumeId String
    (String) The volume size of the image.
    bootable boolean
    (Bool) Indicates if the volume is boot capable.
    name string
    (String) The volume name of the image.
    size number
    (Float) The volume size of the image.
    volumeId string
    (String) The volume size of the image.
    bootable bool
    (Bool) Indicates if the volume is boot capable.
    name str
    (String) The volume name of the image.
    size float
    (Float) The volume size of the image.
    volume_id str
    (String) The volume size of the image.
    bootable Boolean
    (Bool) Indicates if the volume is boot capable.
    name String
    (String) The volume name of the image.
    size Number
    (Float) The volume size of the image.
    volumeId String
    (String) The volume size of the image.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.88.0 published on Friday, Feb 6, 2026 by ibm-cloud
      Meet Neo: Your AI Platform Teammate