1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. getGpu
Viewing docs for IonosCloud v0.3.0
published on Wednesday, Apr 15, 2026 by ionos-cloud
ionoscloud logo
Viewing docs for IonosCloud v0.3.0
published on Wednesday, Apr 15, 2026 by ionos-cloud
    Deprecated: ionoscloud.index/getgpu.getGpu has been deprecated in favor of ionoscloud.compute/getgpu.getGpu

    The GPU data source can be used to search for and return an existing GPU by either its ID or name. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getGpu({
        datacenterId: "datacenter_id",
        serverId: "server_id",
        id: "gpu_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_gpu(datacenter_id="datacenter_id",
        server_id="server_id",
        id="gpu_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetGpu(ctx, &compute.GetGpuArgs{
    			DatacenterId: "datacenter_id",
    			ServerId:     "server_id",
    			Id:           pulumi.StringRef("gpu_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetGpu.Invoke(new()
        {
            DatacenterId = "datacenter_id",
            ServerId = "server_id",
            Id = "gpu_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetGpuArgs;
    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 example = ComputeFunctions.getGpu(GetGpuArgs.builder()
                .datacenterId("datacenter_id")
                .serverId("server_id")
                .id("gpu_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getGpu
          arguments:
            datacenterId: datacenter_id
            serverId: server_id
            id: gpu_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getGpu({
        datacenterId: "datacenter_id",
        serverId: "server_id",
        name: "GPU Name",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_gpu(datacenter_id="datacenter_id",
        server_id="server_id",
        name="GPU Name")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetGpu(ctx, &compute.GetGpuArgs{
    			DatacenterId: "datacenter_id",
    			ServerId:     "server_id",
    			Name:         pulumi.StringRef("GPU Name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Compute.GetGpu.Invoke(new()
        {
            DatacenterId = "datacenter_id",
            ServerId = "server_id",
            Name = "GPU Name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.ComputeFunctions;
    import com.pulumi.ionoscloud.compute.inputs.GetGpuArgs;
    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 example = ComputeFunctions.getGpu(GetGpuArgs.builder()
                .datacenterId("datacenter_id")
                .serverId("server_id")
                .name("GPU Name")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getGpu
          arguments:
            datacenterId: datacenter_id
            serverId: server_id
            name: GPU Name
    

    Using getGpu

    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 getGpu(args: GetGpuArgs, opts?: InvokeOptions): Promise<GetGpuResult>
    function getGpuOutput(args: GetGpuOutputArgs, opts?: InvokeOptions): Output<GetGpuResult>
    def get_gpu(datacenter_id: Optional[str] = None,
                id: Optional[str] = None,
                location: Optional[str] = None,
                name: Optional[str] = None,
                server_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetGpuResult
    def get_gpu_output(datacenter_id: pulumi.Input[Optional[str]] = None,
                id: pulumi.Input[Optional[str]] = None,
                location: pulumi.Input[Optional[str]] = None,
                name: pulumi.Input[Optional[str]] = None,
                server_id: pulumi.Input[Optional[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetGpuResult]
    func GetGpu(ctx *Context, args *GetGpuArgs, opts ...InvokeOption) (*GetGpuResult, error)
    func GetGpuOutput(ctx *Context, args *GetGpuOutputArgs, opts ...InvokeOption) GetGpuResultOutput

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

    public static class GetGpu 
    {
        public static Task<GetGpuResult> InvokeAsync(GetGpuArgs args, InvokeOptions? opts = null)
        public static Output<GetGpuResult> Invoke(GetGpuInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGpuResult> getGpu(GetGpuArgs args, InvokeOptions options)
    public static Output<GetGpuResult> getGpu(GetGpuArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getGpu:getGpu
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DatacenterId string
    The ID of the datacenter.
    ServerId string
    The ID of the server.
    Id string

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    Location string
    Name string
    Name of the GPU.
    DatacenterId string
    The ID of the datacenter.
    ServerId string
    The ID of the server.
    Id string

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    Location string
    Name string
    Name of the GPU.
    datacenterId String
    The ID of the datacenter.
    serverId String
    The ID of the server.
    id String

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    location String
    name String
    Name of the GPU.
    datacenterId string
    The ID of the datacenter.
    serverId string
    The ID of the server.
    id string

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    location string
    name string
    Name of the GPU.
    datacenter_id str
    The ID of the datacenter.
    server_id str
    The ID of the server.
    id str

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    location str
    name str
    Name of the GPU.
    datacenterId String
    The ID of the datacenter.
    serverId String
    The ID of the server.
    id String

    ID of the GPU.

    datacenterId and serverId are required. Either name or id must be provided. If both name and id are provided, the datasource will return an error.

    location String
    name String
    Name of the GPU.

    getGpu Result

    The following output properties are available:

    DatacenterId string
    Id string
    The id of the GPU.
    Model string
    The model of the GPU.
    Name string
    The name of the GPU.
    ServerId string
    Type string
    The type of the GPU.
    Vendor string
    The vendor of the GPU.
    Location string
    DatacenterId string
    Id string
    The id of the GPU.
    Model string
    The model of the GPU.
    Name string
    The name of the GPU.
    ServerId string
    Type string
    The type of the GPU.
    Vendor string
    The vendor of the GPU.
    Location string
    datacenterId String
    id String
    The id of the GPU.
    model String
    The model of the GPU.
    name String
    The name of the GPU.
    serverId String
    type String
    The type of the GPU.
    vendor String
    The vendor of the GPU.
    location String
    datacenterId string
    id string
    The id of the GPU.
    model string
    The model of the GPU.
    name string
    The name of the GPU.
    serverId string
    type string
    The type of the GPU.
    vendor string
    The vendor of the GPU.
    location string
    datacenter_id str
    id str
    The id of the GPU.
    model str
    The model of the GPU.
    name str
    The name of the GPU.
    server_id str
    type str
    The type of the GPU.
    vendor str
    The vendor of the GPU.
    location str
    datacenterId String
    id String
    The id of the GPU.
    model String
    The model of the GPU.
    name String
    The name of the GPU.
    serverId String
    type String
    The type of the GPU.
    vendor String
    The vendor of the GPU.
    location String

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    Viewing docs for IonosCloud v0.3.0
    published on Wednesday, Apr 15, 2026 by ionos-cloud
      Try Pulumi Cloud free. Your team will thank you.