1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. compute
  6. getTemplate
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

    The Template data source can be used to search for and return existing templates by providing any of template properties (name, cores, ram, storage_size). 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 Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getTemplate({
        name: "CUBES S",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_template(name="CUBES S")
    
    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.GetTemplate(ctx, &compute.GetTemplateArgs{
    			Name: pulumi.StringRef("CUBES S"),
    		}, 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.GetTemplate.Invoke(new()
        {
            Name = "CUBES S",
        });
    
    });
    
    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.GetTemplateArgs;
    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.getTemplate(GetTemplateArgs.builder()
                .name("CUBES S")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getTemplate
          arguments:
            name: CUBES S
    

    By Cores

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getTemplate({
        cores: 6,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_template(cores=6)
    
    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.GetTemplate(ctx, &compute.GetTemplateArgs{
    			Cores: pulumi.Float64Ref(6),
    		}, 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.GetTemplate.Invoke(new()
        {
            Cores = 6,
        });
    
    });
    
    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.GetTemplateArgs;
    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.getTemplate(GetTemplateArgs.builder()
                .cores(6)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getTemplate
          arguments:
            cores: 6
    

    By Ram

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getTemplate({
        ram: 49152,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_template(ram=49152)
    
    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.GetTemplate(ctx, &compute.GetTemplateArgs{
    			Ram: pulumi.Float64Ref(49152),
    		}, 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.GetTemplate.Invoke(new()
        {
            Ram = 49152,
        });
    
    });
    
    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.GetTemplateArgs;
    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.getTemplate(GetTemplateArgs.builder()
                .ram(49152)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getTemplate
          arguments:
            ram: 49152
    

    By Storage Size

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.compute.getTemplate({
        storageSize: 80,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.get_template(storage_size=80)
    
    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.GetTemplate(ctx, &compute.GetTemplateArgs{
    			StorageSize: pulumi.Float64Ref(80),
    		}, 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.GetTemplate.Invoke(new()
        {
            StorageSize = 80,
        });
    
    });
    
    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.GetTemplateArgs;
    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.getTemplate(GetTemplateArgs.builder()
                .storageSize(80)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:compute:getTemplate
          arguments:
            storageSize: 80
    

    Using getTemplate

    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 getTemplate(args: GetTemplateArgs, opts?: InvokeOptions): Promise<GetTemplateResult>
    function getTemplateOutput(args: GetTemplateOutputArgs, opts?: InvokeOptions): Output<GetTemplateResult>
    def get_template(category: Optional[str] = None,
                     cores: Optional[float] = None,
                     gpuses: Optional[Sequence[GetTemplateGpus]] = None,
                     name: Optional[str] = None,
                     ram: Optional[float] = None,
                     storage_size: Optional[float] = None,
                     opts: Optional[InvokeOptions] = None) -> GetTemplateResult
    def get_template_output(category: pulumi.Input[Optional[str]] = None,
                     cores: pulumi.Input[Optional[float]] = None,
                     gpuses: pulumi.Input[Optional[Sequence[pulumi.Input[GetTemplateGpusArgs]]]] = None,
                     name: pulumi.Input[Optional[str]] = None,
                     ram: pulumi.Input[Optional[float]] = None,
                     storage_size: pulumi.Input[Optional[float]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetTemplateResult]
    func GetTemplate(ctx *Context, args *GetTemplateArgs, opts ...InvokeOption) (*GetTemplateResult, error)
    func GetTemplateOutput(ctx *Context, args *GetTemplateOutputArgs, opts ...InvokeOption) GetTemplateResultOutput

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

    public static class GetTemplate 
    {
        public static Task<GetTemplateResult> InvokeAsync(GetTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetTemplateResult> Invoke(GetTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
    public static Output<GetTemplateResult> getTemplate(GetTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:compute/getTemplate:getTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Category string

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    Cores double
    The CPU cores count.
    Gpuses List<Ionoscloud.GetTemplateGpus>
    List of GPUs in the template
    Name string
    A name of that resource.
    Ram double
    The RAM size in MB.
    StorageSize double
    The storage size in GB.
    Category string

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    Cores float64
    The CPU cores count.
    Gpuses []GetTemplateGpus
    List of GPUs in the template
    Name string
    A name of that resource.
    Ram float64
    The RAM size in MB.
    StorageSize float64
    The storage size in GB.
    category String

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    cores Double
    The CPU cores count.
    gpuses List<GetTemplateGpus>
    List of GPUs in the template
    name String
    A name of that resource.
    ram Double
    The RAM size in MB.
    storageSize Double
    The storage size in GB.
    category string

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    cores number
    The CPU cores count.
    gpuses GetTemplateGpus[]
    List of GPUs in the template
    name string
    A name of that resource.
    ram number
    The RAM size in MB.
    storageSize number
    The storage size in GB.
    category str

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    cores float
    The CPU cores count.
    gpuses Sequence[GetTemplateGpus]
    List of GPUs in the template
    name str
    A name of that resource.
    ram float
    The RAM size in MB.
    storage_size float
    The storage size in GB.
    category String

    The category of the template.

    Any of the arguments ca be provided. If none, the datasource will return an error.

    cores Number
    The CPU cores count.
    gpuses List<Property Map>
    List of GPUs in the template
    name String
    A name of that resource.
    ram Number
    The RAM size in MB.
    storageSize Number
    The storage size in GB.

    getTemplate Result

    The following output properties are available:

    Category string
    The category of the template
    Cores double
    The CPU cores count
    Gpuses List<Ionoscloud.GetTemplateGpus>
    List of GPUs in the template
    Id string
    Id of template
    Name string
    Name of template
    Ram double
    The RAM size in MB
    StorageSize double
    The storage size in GB
    Category string
    The category of the template
    Cores float64
    The CPU cores count
    Gpuses []GetTemplateGpus
    List of GPUs in the template
    Id string
    Id of template
    Name string
    Name of template
    Ram float64
    The RAM size in MB
    StorageSize float64
    The storage size in GB
    category String
    The category of the template
    cores Double
    The CPU cores count
    gpuses List<GetTemplateGpus>
    List of GPUs in the template
    id String
    Id of template
    name String
    Name of template
    ram Double
    The RAM size in MB
    storageSize Double
    The storage size in GB
    category string
    The category of the template
    cores number
    The CPU cores count
    gpuses GetTemplateGpus[]
    List of GPUs in the template
    id string
    Id of template
    name string
    Name of template
    ram number
    The RAM size in MB
    storageSize number
    The storage size in GB
    category str
    The category of the template
    cores float
    The CPU cores count
    gpuses Sequence[GetTemplateGpus]
    List of GPUs in the template
    id str
    Id of template
    name str
    Name of template
    ram float
    The RAM size in MB
    storage_size float
    The storage size in GB
    category String
    The category of the template
    cores Number
    The CPU cores count
    gpuses List<Property Map>
    List of GPUs in the template
    id String
    Id of template
    name String
    Name of template
    ram Number
    The RAM size in MB
    storageSize Number
    The storage size in GB

    Supporting Types

    GetTemplateGpus

    Count int
    The number of GPUs
    Model string
    The model of the GPU
    Type string
    The type of the GPU
    Vendor string
    The vendor of the GPU
    Count int
    The number of GPUs
    Model string
    The model of the GPU
    Type string
    The type of the GPU
    Vendor string
    The vendor of the GPU
    count Integer
    The number of GPUs
    model String
    The model of the GPU
    type String
    The type of the GPU
    vendor String
    The vendor of the GPU
    count number
    The number of GPUs
    model string
    The model of the GPU
    type string
    The type of the GPU
    vendor string
    The vendor of the GPU
    count int
    The number of GPUs
    model str
    The model of the GPU
    type str
    The type of the GPU
    vendor str
    The vendor of the GPU
    count Number
    The number of GPUs
    model String
    The model of the GPU
    type String
    The type of the GPU
    vendor String
    The vendor of the GPU

    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.