1. Packages
  2. Packages
  3. Hcloud Provider
  4. API Docs
  5. getImages
Viewing docs for Hetzner Cloud v1.39.1
published on Thursday, Jul 16, 2026 by Pulumi
hcloud logo
Viewing docs for Hetzner Cloud v1.39.1
published on Thursday, Jul 16, 2026 by Pulumi

    Provides a list of Hetzner Storage Images.

    It is recommended to always provide the image architecture (using ‘‘with_architecture’’).

    See the Image API documentation for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const byArchitecture = hcloud.getImages({
        withArchitectures: ["x86"],
    });
    const byLabel = hcloud.getImages({
        withSelector: "key=value",
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    by_architecture = hcloud.get_images(with_architectures=["x86"])
    by_label = hcloud.get_images(with_selector="key=value")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hcloud.GetImages(ctx, &hcloud.GetImagesArgs{
    			WithArchitectures: []string{
    				"x86",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hcloud.GetImages(ctx, &hcloud.GetImagesArgs{
    			WithSelector: pulumi.StringRef("key=value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using HCloud = Pulumi.HCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var byArchitecture = HCloud.GetImages.Invoke(new()
        {
            WithArchitectures = new[]
            {
                "x86",
            },
        });
    
        var byLabel = HCloud.GetImages.Invoke(new()
        {
            WithSelector = "key=value",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hcloud.HcloudFunctions;
    import com.pulumi.hcloud.inputs.GetImagesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 byArchitecture = HcloudFunctions.getImages(GetImagesArgs.builder()
                .withArchitectures("x86")
                .build());
    
            final var byLabel = HcloudFunctions.getImages(GetImagesArgs.builder()
                .withSelector("key=value")
                .build());
    
        }
    }
    
    variables:
      byArchitecture:
        fn::invoke:
          function: hcloud:getImages
          arguments:
            withArchitectures:
              - x86
      byLabel:
        fn::invoke:
          function: hcloud:getImages
          arguments:
            withSelector: key=value
    
    pulumi {
      required_providers {
        hcloud = {
          source = "pulumi/hcloud"
        }
      }
    }
    
    data "hcloud_getimages" "byArchitecture" {
      with_architectures = ["x86"]
    }
    data "hcloud_getimages" "byLabel" {
      with_selector = "key=value"
    }
    

    Using getImages

    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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
    function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>
    def get_images(include_deprecated: Optional[bool] = None,
                   most_recent: Optional[bool] = None,
                   with_architectures: Optional[Sequence[str]] = None,
                   with_selector: Optional[str] = None,
                   with_statuses: Optional[Sequence[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetImagesResult
    def get_images_output(include_deprecated: pulumi.Input[Optional[bool]] = None,
                   most_recent: pulumi.Input[Optional[bool]] = None,
                   with_architectures: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                   with_selector: pulumi.Input[Optional[str]] = None,
                   with_statuses: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]
    func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
    func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput

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

    public static class GetImages 
    {
        public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
        public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
    public static Output<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hcloud:index/getImages:getImages
      arguments:
        # arguments dictionary
    data "hcloud_getimages" "name" {
        # arguments
    }

    The following arguments are supported:

    IncludeDeprecated bool
    Include deprecated images.
    MostRecent bool
    Sort results by created date.
    WithArchitectures List<string>
    Filter results by architecture, for example x86 or arm.
    WithSelector string
    Filter results using a Label Selector.
    WithStatuses List<string>
    Filter results by statuses, for example creating or available.
    IncludeDeprecated bool
    Include deprecated images.
    MostRecent bool
    Sort results by created date.
    WithArchitectures []string
    Filter results by architecture, for example x86 or arm.
    WithSelector string
    Filter results using a Label Selector.
    WithStatuses []string
    Filter results by statuses, for example creating or available.
    include_deprecated bool
    Include deprecated images.
    most_recent bool
    Sort results by created date.
    with_architectures list(string)
    Filter results by architecture, for example x86 or arm.
    with_selector string
    Filter results using a Label Selector.
    with_statuses list(string)
    Filter results by statuses, for example creating or available.
    includeDeprecated Boolean
    Include deprecated images.
    mostRecent Boolean
    Sort results by created date.
    withArchitectures List<String>
    Filter results by architecture, for example x86 or arm.
    withSelector String
    Filter results using a Label Selector.
    withStatuses List<String>
    Filter results by statuses, for example creating or available.
    includeDeprecated boolean
    Include deprecated images.
    mostRecent boolean
    Sort results by created date.
    withArchitectures string[]
    Filter results by architecture, for example x86 or arm.
    withSelector string
    Filter results using a Label Selector.
    withStatuses string[]
    Filter results by statuses, for example creating or available.
    include_deprecated bool
    Include deprecated images.
    most_recent bool
    Sort results by created date.
    with_architectures Sequence[str]
    Filter results by architecture, for example x86 or arm.
    with_selector str
    Filter results using a Label Selector.
    with_statuses Sequence[str]
    Filter results by statuses, for example creating or available.
    includeDeprecated Boolean
    Include deprecated images.
    mostRecent Boolean
    Sort results by created date.
    withArchitectures List<String>
    Filter results by architecture, for example x86 or arm.
    withSelector String
    Filter results using a Label Selector.
    withStatuses List<String>
    Filter results by statuses, for example creating or available.

    getImages Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Images List<Pulumi.HCloud.Outputs.GetImagesImage>
    IncludeDeprecated bool
    Include deprecated images.
    MostRecent bool
    Sort results by created date.
    WithArchitectures List<string>
    Filter results by architecture, for example x86 or arm.
    WithSelector string
    Filter results using a Label Selector.
    WithStatuses List<string>
    Filter results by statuses, for example creating or available.
    Id string
    The ID of this resource.
    Images []GetImagesImage
    IncludeDeprecated bool
    Include deprecated images.
    MostRecent bool
    Sort results by created date.
    WithArchitectures []string
    Filter results by architecture, for example x86 or arm.
    WithSelector string
    Filter results using a Label Selector.
    WithStatuses []string
    Filter results by statuses, for example creating or available.
    id string
    The ID of this resource.
    images list(object)
    include_deprecated bool
    Include deprecated images.
    most_recent bool
    Sort results by created date.
    with_architectures list(string)
    Filter results by architecture, for example x86 or arm.
    with_selector string
    Filter results using a Label Selector.
    with_statuses list(string)
    Filter results by statuses, for example creating or available.
    id String
    The ID of this resource.
    images List<GetImagesImage>
    includeDeprecated Boolean
    Include deprecated images.
    mostRecent Boolean
    Sort results by created date.
    withArchitectures List<String>
    Filter results by architecture, for example x86 or arm.
    withSelector String
    Filter results using a Label Selector.
    withStatuses List<String>
    Filter results by statuses, for example creating or available.
    id string
    The ID of this resource.
    images GetImagesImage[]
    includeDeprecated boolean
    Include deprecated images.
    mostRecent boolean
    Sort results by created date.
    withArchitectures string[]
    Filter results by architecture, for example x86 or arm.
    withSelector string
    Filter results using a Label Selector.
    withStatuses string[]
    Filter results by statuses, for example creating or available.
    id str
    The ID of this resource.
    images Sequence[GetImagesImage]
    include_deprecated bool
    Include deprecated images.
    most_recent bool
    Sort results by created date.
    with_architectures Sequence[str]
    Filter results by architecture, for example x86 or arm.
    with_selector str
    Filter results using a Label Selector.
    with_statuses Sequence[str]
    Filter results by statuses, for example creating or available.
    id String
    The ID of this resource.
    images List<Property Map>
    includeDeprecated Boolean
    Include deprecated images.
    mostRecent Boolean
    Sort results by created date.
    withArchitectures List<String>
    Filter results by architecture, for example x86 or arm.
    withSelector String
    Filter results using a Label Selector.
    withStatuses List<String>
    Filter results by statuses, for example creating or available.

    Supporting Types

    GetImagesImage

    Architecture string
    CPU architecture compatible with the Image.
    Created string
    Point in time when the Image was created (in RFC3339 format).
    Deprecated string
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    Description string
    Description of the Image.
    Id int
    ID of the Image.
    Labels Dictionary<string, string>
    User-defined labels (key-value pairs) for the resource.
    Name string
    Name of the Image, only present when the type is system.
    OsFlavor string
    Flavor of the operating system contained in the Image.
    OsVersion string
    Version of the operating system contained in the Image.
    RapidDeploy bool
    Whether the Image is optimized for a rapid deployment.
    Type string
    Type of the Image, for example system, backup or snapshot.
    Architecture string
    CPU architecture compatible with the Image.
    Created string
    Point in time when the Image was created (in RFC3339 format).
    Deprecated string
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    Description string
    Description of the Image.
    Id int
    ID of the Image.
    Labels map[string]string
    User-defined labels (key-value pairs) for the resource.
    Name string
    Name of the Image, only present when the type is system.
    OsFlavor string
    Flavor of the operating system contained in the Image.
    OsVersion string
    Version of the operating system contained in the Image.
    RapidDeploy bool
    Whether the Image is optimized for a rapid deployment.
    Type string
    Type of the Image, for example system, backup or snapshot.
    architecture string
    CPU architecture compatible with the Image.
    created string
    Point in time when the Image was created (in RFC3339 format).
    deprecated string
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    description string
    Description of the Image.
    id number
    ID of the Image.
    labels map(string)
    User-defined labels (key-value pairs) for the resource.
    name string
    Name of the Image, only present when the type is system.
    os_flavor string
    Flavor of the operating system contained in the Image.
    os_version string
    Version of the operating system contained in the Image.
    rapid_deploy bool
    Whether the Image is optimized for a rapid deployment.
    type string
    Type of the Image, for example system, backup or snapshot.
    architecture String
    CPU architecture compatible with the Image.
    created String
    Point in time when the Image was created (in RFC3339 format).
    deprecated String
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    description String
    Description of the Image.
    id Integer
    ID of the Image.
    labels Map<String,String>
    User-defined labels (key-value pairs) for the resource.
    name String
    Name of the Image, only present when the type is system.
    osFlavor String
    Flavor of the operating system contained in the Image.
    osVersion String
    Version of the operating system contained in the Image.
    rapidDeploy Boolean
    Whether the Image is optimized for a rapid deployment.
    type String
    Type of the Image, for example system, backup or snapshot.
    architecture string
    CPU architecture compatible with the Image.
    created string
    Point in time when the Image was created (in RFC3339 format).
    deprecated string
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    description string
    Description of the Image.
    id number
    ID of the Image.
    labels {[key: string]: string}
    User-defined labels (key-value pairs) for the resource.
    name string
    Name of the Image, only present when the type is system.
    osFlavor string
    Flavor of the operating system contained in the Image.
    osVersion string
    Version of the operating system contained in the Image.
    rapidDeploy boolean
    Whether the Image is optimized for a rapid deployment.
    type string
    Type of the Image, for example system, backup or snapshot.
    architecture str
    CPU architecture compatible with the Image.
    created str
    Point in time when the Image was created (in RFC3339 format).
    deprecated str
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    description str
    Description of the Image.
    id int
    ID of the Image.
    labels Mapping[str, str]
    User-defined labels (key-value pairs) for the resource.
    name str
    Name of the Image, only present when the type is system.
    os_flavor str
    Flavor of the operating system contained in the Image.
    os_version str
    Version of the operating system contained in the Image.
    rapid_deploy bool
    Whether the Image is optimized for a rapid deployment.
    type str
    Type of the Image, for example system, backup or snapshot.
    architecture String
    CPU architecture compatible with the Image.
    created String
    Point in time when the Image was created (in RFC3339 format).
    deprecated String
    Point in time when the Image was marked as deprecated (in RFC3339 format).
    description String
    Description of the Image.
    id Number
    ID of the Image.
    labels Map<String>
    User-defined labels (key-value pairs) for the resource.
    name String
    Name of the Image, only present when the type is system.
    osFlavor String
    Flavor of the operating system contained in the Image.
    osVersion String
    Version of the operating system contained in the Image.
    rapidDeploy Boolean
    Whether the Image is optimized for a rapid deployment.
    type String
    Type of the Image, for example system, backup or snapshot.

    Package Details

    Repository
    Hetzner Cloud pulumi/pulumi-hcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcloud Terraform Provider.
    hcloud logo
    Viewing docs for Hetzner Cloud v1.39.1
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial