Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
Provides details about a specific Hetzner Cloud Server Type.
Use this resource to get detailed information about specific Server Type.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const byId = hcloud.getServerType({
id: 22,
});
const byName = hcloud.getServerType({
name: "cx23",
});
const main = new hcloud.Server("main", {
name: "my-server",
location: "fsn1",
image: "debian-12",
serverType: byName.then(byName => byName.name),
});
import pulumi
import pulumi_hcloud as hcloud
by_id = hcloud.get_server_type(id=22)
by_name = hcloud.get_server_type(name="cx23")
main = hcloud.Server("main",
name="my-server",
location="fsn1",
image="debian-12",
server_type=by_name.name)
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.GetServerType(ctx, &hcloud.GetServerTypeArgs{
Id: pulumi.IntRef(22),
}, nil)
if err != nil {
return err
}
byName, err := hcloud.GetServerType(ctx, &hcloud.GetServerTypeArgs{
Name: pulumi.StringRef("cx23"),
}, nil)
if err != nil {
return err
}
_, err = hcloud.NewServer(ctx, "main", &hcloud.ServerArgs{
Name: pulumi.String("my-server"),
Location: pulumi.String("fsn1"),
Image: pulumi.String("debian-12"),
ServerType: pulumi.String(byName.Name),
})
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 byId = HCloud.GetServerType.Invoke(new()
{
Id = 22,
});
var byName = HCloud.GetServerType.Invoke(new()
{
Name = "cx23",
});
var main = new HCloud.Server("main", new()
{
Name = "my-server",
Location = "fsn1",
Image = "debian-12",
ServerType = byName.Apply(getServerTypeResult => getServerTypeResult.Name),
});
});
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.GetServerTypeArgs;
import com.pulumi.hcloud.Server;
import com.pulumi.hcloud.ServerArgs;
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 byId = HcloudFunctions.getServerType(GetServerTypeArgs.builder()
.id(22)
.build());
final var byName = HcloudFunctions.getServerType(GetServerTypeArgs.builder()
.name("cx23")
.build());
var main = new Server("main", ServerArgs.builder()
.name("my-server")
.location("fsn1")
.image("debian-12")
.serverType(byName.name())
.build());
}
}
resources:
main:
type: hcloud:Server
properties:
name: my-server
location: fsn1
image: debian-12
serverType: ${byName.name}
variables:
byId:
fn::invoke:
function: hcloud:getServerType
arguments:
id: 22
byName:
fn::invoke:
function: hcloud:getServerType
arguments:
name: cx23
Using getServerType
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 getServerType(args: GetServerTypeArgs, opts?: InvokeOptions): Promise<GetServerTypeResult>
function getServerTypeOutput(args: GetServerTypeOutputArgs, opts?: InvokeOptions): Output<GetServerTypeResult>def get_server_type(id: Optional[int] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServerTypeResult
def get_server_type_output(id: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServerTypeResult]func GetServerType(ctx *Context, args *GetServerTypeArgs, opts ...InvokeOption) (*GetServerTypeResult, error)
func GetServerTypeOutput(ctx *Context, args *GetServerTypeOutputArgs, opts ...InvokeOption) GetServerTypeResultOutput> Note: This function is named GetServerType in the Go SDK.
public static class GetServerType
{
public static Task<GetServerTypeResult> InvokeAsync(GetServerTypeArgs args, InvokeOptions? opts = null)
public static Output<GetServerTypeResult> Invoke(GetServerTypeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerTypeResult> getServerType(GetServerTypeArgs args, InvokeOptions options)
public static Output<GetServerTypeResult> getServerType(GetServerTypeArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getServerType:getServerType
arguments:
# arguments dictionaryThe following arguments are supported:
getServerType Result
The following output properties are available:
- Architecture string
- Architecture of the cpu for a Server of this type.
- Category string
- Category of the Server Type.
- Cores int
- Number of cpu cores for a Server of this type.
- Cpu
Type string - Type of cpu for a Server of this type.
- Deprecation
Announced string - Date of the Server Type deprecation announcement.
- Description string
- Description of the Server Type.
- Disk int
- Disk size in GB for a Server of this type.
- Included
Traffic int - Is
Deprecated bool - Whether the Server Type is deprecated.
- Locations
List<Pulumi.
HCloud. Outputs. Get Server Type Location> - List of supported Locations for this Server Type.
- Memory int
- Memory in GB for a Server of this type.
- Storage
Type string - Type of boot drive for a Server of this type.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- Id int
- ID of the Server Type.
- Name string
- Name of the Server Type.
- Architecture string
- Architecture of the cpu for a Server of this type.
- Category string
- Category of the Server Type.
- Cores int
- Number of cpu cores for a Server of this type.
- Cpu
Type string - Type of cpu for a Server of this type.
- Deprecation
Announced string - Date of the Server Type deprecation announcement.
- Description string
- Description of the Server Type.
- Disk int
- Disk size in GB for a Server of this type.
- Included
Traffic int - Is
Deprecated bool - Whether the Server Type is deprecated.
- Locations
[]Get
Server Type Location - List of supported Locations for this Server Type.
- Memory int
- Memory in GB for a Server of this type.
- Storage
Type string - Type of boot drive for a Server of this type.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- Id int
- ID of the Server Type.
- Name string
- Name of the Server Type.
- architecture String
- Architecture of the cpu for a Server of this type.
- category String
- Category of the Server Type.
- cores Integer
- Number of cpu cores for a Server of this type.
- cpu
Type String - Type of cpu for a Server of this type.
- deprecation
Announced String - Date of the Server Type deprecation announcement.
- description String
- Description of the Server Type.
- disk Integer
- Disk size in GB for a Server of this type.
- included
Traffic Integer - is
Deprecated Boolean - Whether the Server Type is deprecated.
- locations
List<Get
Server Type Location> - List of supported Locations for this Server Type.
- memory Integer
- Memory in GB for a Server of this type.
- storage
Type String - Type of boot drive for a Server of this type.
- String
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- id Integer
- ID of the Server Type.
- name String
- Name of the Server Type.
- architecture string
- Architecture of the cpu for a Server of this type.
- category string
- Category of the Server Type.
- cores number
- Number of cpu cores for a Server of this type.
- cpu
Type string - Type of cpu for a Server of this type.
- deprecation
Announced string - Date of the Server Type deprecation announcement.
- description string
- Description of the Server Type.
- disk number
- Disk size in GB for a Server of this type.
- included
Traffic number - is
Deprecated boolean - Whether the Server Type is deprecated.
- locations
Get
Server Type Location[] - List of supported Locations for this Server Type.
- memory number
- Memory in GB for a Server of this type.
- storage
Type string - Type of boot drive for a Server of this type.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- id number
- ID of the Server Type.
- name string
- Name of the Server Type.
- architecture str
- Architecture of the cpu for a Server of this type.
- category str
- Category of the Server Type.
- cores int
- Number of cpu cores for a Server of this type.
- cpu_
type str - Type of cpu for a Server of this type.
- deprecation_
announced str - Date of the Server Type deprecation announcement.
- description str
- Description of the Server Type.
- disk int
- Disk size in GB for a Server of this type.
- included_
traffic int - is_
deprecated bool - Whether the Server Type is deprecated.
- locations
Sequence[Get
Server Type Location] - List of supported Locations for this Server Type.
- memory int
- Memory in GB for a Server of this type.
- storage_
type str - Type of boot drive for a Server of this type.
- str
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- id int
- ID of the Server Type.
- name str
- Name of the Server Type.
- architecture String
- Architecture of the cpu for a Server of this type.
- category String
- Category of the Server Type.
- cores Number
- Number of cpu cores for a Server of this type.
- cpu
Type String - Type of cpu for a Server of this type.
- deprecation
Announced String - Date of the Server Type deprecation announcement.
- description String
- Description of the Server Type.
- disk Number
- Disk size in GB for a Server of this type.
- included
Traffic Number - is
Deprecated Boolean - Whether the Server Type is deprecated.
- locations List<Property Map>
- List of supported Locations for this Server Type.
- memory Number
- Memory in GB for a Server of this type.
- storage
Type String - Type of boot drive for a Server of this type.
- String
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- id Number
- ID of the Server Type.
- name String
- Name of the Server Type.
Supporting Types
GetServerTypeLocation
- Deprecation
Announced string - Date of the Server Type deprecation announcement.
- Id int
- ID of the Location.
- Is
Deprecated bool - Whether the Server Type is deprecated.
- Name string
- Name of the Location.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- Deprecation
Announced string - Date of the Server Type deprecation announcement.
- Id int
- ID of the Location.
- Is
Deprecated bool - Whether the Server Type is deprecated.
- Name string
- Name of the Location.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- deprecation
Announced String - Date of the Server Type deprecation announcement.
- id Integer
- ID of the Location.
- is
Deprecated Boolean - Whether the Server Type is deprecated.
- name String
- Name of the Location.
- String
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- deprecation
Announced string - Date of the Server Type deprecation announcement.
- id number
- ID of the Location.
- is
Deprecated boolean - Whether the Server Type is deprecated.
- name string
- Name of the Location.
- string
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- deprecation_
announced str - Date of the Server Type deprecation announcement.
- id int
- ID of the Location.
- is_
deprecated bool - Whether the Server Type is deprecated.
- name str
- Name of the Location.
- str
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
- deprecation
Announced String - Date of the Server Type deprecation announcement.
- id Number
- ID of the Location.
- is
Deprecated Boolean - Whether the Server Type is deprecated.
- name String
- Name of the Location.
- String
- Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
Viewing docs for Hetzner Cloud v1.32.1
published on Tuesday, Feb 17, 2026 by Pulumi
published on Tuesday, Feb 17, 2026 by Pulumi
