Skip to main content

Hetzner Cloud

@swamp/hetzner-cloudv2026.06.03.1· 1d agoMODELS
01README

Hetzner Cloud infrastructure models

02Release Notes
  • Updated: firewalls, networks
03Models11
@swamp/hetzner-cloud/certificatesv2026.05.28.1certificates.ts

Global Arguments

ArgumentTypeDescription
namestringName of the Certificate.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
type?enumChoose between uploading a Certificate in PEM format or requesting a managed *Let's Encrypt* Certificate.
certificate?stringCertificate and chain in PEM format, in order so that each record directly certifies the one preceding. Required for type `uploaded` Certificates.
private_key?stringCertificate key in PEM format. Required for type `uploaded` Certificates.
domain_names?arrayDomains and subdomains that should be contained in the Certificate issued by *Let's Encrypt*. Required for type `managed` Certificates.
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a certificate
fn get(id: number)
Get a certificate
ArgumentTypeDescription
idnumberThe ID of the certificate
fn update()
Update certificate attributes
fn delete(id: number)
Delete the certificate
ArgumentTypeDescription
idnumberThe ID of the certificate
fn sync()
Sync certificate state from Hetzner
fn list(label_selector?: string)
List certificates, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Certificate resource state
@swamp/hetzner-cloud/firewallsv2026.06.03.1firewalls.ts

Global Arguments

ArgumentTypeDescription
namestringName of the [Firewall](#tag/firewalls).\n\nMust be unique per Project.\n
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
rules?arrayArray of rules.\n\nRules are limited to 50 entries per [Firewall](#tag/firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits).\n
apply_to?arrayResources to apply the [Firewall](#tag/firewalls) to.\n\nResources added directly are taking precedence over those added via a [Label Selector](#description/label-selector).\n
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a firewall
fn get(id: number)
Get a firewall
ArgumentTypeDescription
idnumberThe ID of the firewall
fn update()
Update firewall attributes
fn delete(id: number)
Delete the firewall
ArgumentTypeDescription
idnumberThe ID of the firewall
fn sync()
Sync firewall state from Hetzner
fn list(label_selector?: string)
List firewalls, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Firewall resource state
@swamp/hetzner-cloud/floating-ipsv2026.05.28.1floating_ips.ts

Global Arguments

ArgumentTypeDescription
description?stringDescription of the Resource.
name?stringName of the Resource. Must be unique per Project.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
typeenumThe Floating IP type.
server?number[Server](#tag/servers) the [Floating IP](#tag/floating-ips) is assigned to.\n\n`null` if not assigned.\n
home_location?stringHome [Location](#tag/locations) for the [Floating IP](#tag/floating-ips).\n\nEither the ID or the name of the [Location](#tag/locations).\n\nOnly optional if no [Server](#tag/servers) is provided. Routing is optimized for this [Locations](#tag/locations).\n
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a floating ip
fn get(id: number)
Get a floating ip
ArgumentTypeDescription
idnumberThe ID of the floating ip
fn update()
Update floating ip attributes
fn delete(id: number)
Delete the floating ip
ArgumentTypeDescription
idnumberThe ID of the floating ip
fn sync()
Sync floating ip state from Hetzner
fn list(label_selector?: string)
List floating ips, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Floating ip resource state
@swamp/hetzner-cloud/load-balancersv2026.05.28.1load_balancers.ts

Global Arguments

ArgumentTypeDescription
namestringName of the Load Balancer.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
load_balancer_typestringID or name of the Load Balancer type this Load Balancer should be created with.
algorithm?objectAlgorithm of the Load Balancer.
services?arrayArray of services.
targets?arrayArray of targets.
public_interface?booleanEnable or disable the public interface of the Load Balancer.
network?numberID of the network the Load Balancer should be attached to on creation.
network_zone?stringName of network zone.
location?stringID or name of Location to create Load Balancer in.
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a load balancer
fn get(id: number)
Get a load balancer
ArgumentTypeDescription
idnumberThe ID of the load balancer
fn update()
Update load balancer attributes
fn delete(id: number)
Delete the load balancer
ArgumentTypeDescription
idnumberThe ID of the load balancer
fn sync()
Sync load balancer state from Hetzner
fn list(label_selector?: string)
List load balancers, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Load balancer resource state
@swamp/hetzner-cloud/networksv2026.06.03.1networks.ts

Global Arguments

ArgumentTypeDescription
namestringName of the [Network](#tag/networks).
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
expose_routes_to_vswitch?booleanToggle to expose routes to the [Networks](#tag/networks) vSwitch.\n\nIndicates if the routes from this [Network](#tag/networks) should be exposed to the vSwitch in this [Network](#tag/networks). Only takes effect if a [vSwitch is setup](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch) in this [Network](#tag/networks).\n
ip_rangestringIP range of the [Network](#tag/networks).\n\nUses CIDR notation.\n\nMust span all included subnets. Must be one of the private IPv4 ranges of RFC1918.\n\nMinimum network size is /24. We highly recommend that you pick a larger [Network](#tag/networks) with a /16 netmask.\n
subnets?arrayArray of subnets to allocate.
routes?arrayArray of routes set in this [Network](#tag/networks).
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a network
fn get(id: number)
Get a network
ArgumentTypeDescription
idnumberThe ID of the network
fn update()
Update network attributes
fn delete(id: number)
Delete the network
ArgumentTypeDescription
idnumberThe ID of the network
fn sync()
Sync network state from Hetzner
fn list(label_selector?: string)
List networks, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Network resource state
@swamp/hetzner-cloud/placement-groupsv2026.05.28.1placement_groups.ts

Global Arguments

ArgumentTypeDescription
namestringName of the Placement Group.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
typeenumDefine the Placement Group Type.
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a placement group
fn get(id: number)
Get a placement group
ArgumentTypeDescription
idnumberThe ID of the placement group
fn update()
Update placement group attributes
fn delete(id: number)
Delete the placement group
ArgumentTypeDescription
idnumberThe ID of the placement group
fn sync()
Sync placement group state from Hetzner
fn list(label_selector?: string)
List placement groups, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Placement group resource state
@swamp/hetzner-cloud/primary-ipsv2026.05.28.1primary_ips.ts

Global Arguments

ArgumentTypeDescription
namestringName of the Resource. Must be unique per Project.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
auto_delete?booleanAuto deletion state.\n\nIf enabled the [Primary IP](#tag/primary-ips) will be deleted once the assigned resource gets deleted.\n
typeenum[Primary IP](#tag/primary-ips) type.
datacenter?string**Deprecated**: This property is deprecated and will be removed after 1 July 2026.\nUse the `location` key instead.\n\n[Data Center](#tag/data-centers) ID or name.\n\nThe [Primary IP](#tag/primary-ips) will be bound to this [Data Center](#tag/data-centers).\nOmit if `assignee_id`/`assignee_type` or `location` are provided.\n
location?string[Location](#tag/locations) ID or name the [Primary IP](#tag/primary-ips) will be bound to.\n\nOmit if `assignee_id`/`assignee_type` or `datacenter` are provided.\n
assignee_typeenumType of resource the [Primary IP](#tag/primary-ips) can get assigned to.\n\nCurrently [Primary IPs](#tag/primary-ips) can only be assigned to [Servers](#tag/servers),\ntherefore this field must be set to `server`.\n
assignee_id?numberID of resource to assign the [Primary IP](#tag/primary-ips) to.\n\nOmitted if the [Primary IP](#tag/primary-ips) should not get assigned.\n
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a primary ip
fn get(id: number)
Get a primary ip
ArgumentTypeDescription
idnumberThe ID of the primary ip
fn update()
Update primary ip attributes
fn delete(id: number)
Delete the primary ip
ArgumentTypeDescription
idnumberThe ID of the primary ip
fn sync()
Sync primary ip state from Hetzner
fn list(label_selector?: string)
List primary ips, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Primary ip resource state
@swamp/hetzner-cloud/serversv2026.05.28.1servers.ts

Global Arguments

ArgumentTypeDescription
namestringName of the Server to create (must be unique per Project and a valid hostname as per RFC 1123).
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
location?stringID or name of the Location to create the Server in (must not be used together with `datacenter`).
datacenter?string**Deprecated**: This property is deprecated and will be removed after the 1 July 2026.\nUse the `location` property instead.\n\nID or name of the Data Center to create Server in (must not be used together with `location`).\n
server_typestringID or name of the Server type this Server should be created with.
start_after_create?booleanThis automatically triggers a [Power on a Server-Server Action](#tag/server-actions/poweron_server) after the creation is finished and is returned in the `next_actions` response object.
imagestringID or name of the Image the Server is created from.
placement_group?numberID of the Placement Group the Server should be in.
ssh_keys?arraySSH key IDs (`integer`) or names (`string`) which should be injected into the Server at creation time.
volumes?arrayVolume IDs which should be attached to the Server at the creation time. Volumes must be in the same Location.
networks?arrayNetwork IDs which should be attached to the Server private network interface at the creation time.
firewalls?arrayFirewalls which should be applied on the Server's public network interface at creation time.
user_data?stringCloud-Init user data to use during Server creation. This field is limited to 32KiB.
automount?booleanAuto-mount Volumes after attach.
public_net?objectPublic Network options.
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a server
fn get(id: number)
Get a server
ArgumentTypeDescription
idnumberThe ID of the server
fn update()
Update server attributes
fn delete(id: number)
Delete the server
ArgumentTypeDescription
idnumberThe ID of the server
fn sync()
Sync server state from Hetzner
fn list(label_selector?: string)
List servers, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Server resource state
@swamp/hetzner-cloud/ssh-keysv2026.05.28.1ssh_keys.ts

Global Arguments

ArgumentTypeDescription
namestringName of the SSH key.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
public_keystringPublic key.
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a ssh key
fn get(id: number)
Get a ssh key
ArgumentTypeDescription
idnumberThe ID of the ssh key
fn update()
Update ssh key attributes
fn delete(id: number)
Delete the ssh key
ArgumentTypeDescription
idnumberThe ID of the ssh key
fn sync()
Sync ssh key state from Hetzner
fn list(label_selector?: string)
List ssh keys, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Ssh key resource state
@swamp/hetzner-cloud/volumesv2026.05.28.1volumes.ts

Global Arguments

ArgumentTypeDescription
namestringName of the volume.
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
sizenumberSize of the Volume in GB.
automount?booleanAuto-mount Volume after attach. `server` must be provided.
format?stringFormat Volume after creation. One of: `xfs`, `ext4`.
location?stringLocation to create the Volume in (can be omitted if Server is specified).
server?numberServer to which to attach the Volume once it's created (Volume will be created in the same Location as the server).
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a volume
fn get(id: number)
Get a volume
ArgumentTypeDescription
idnumberThe ID of the volume
fn update()
Update volume attributes
fn delete(id: number)
Delete the volume
ArgumentTypeDescription
idnumberThe ID of the volume
fn sync()
Sync volume state from Hetzner
fn list(label_selector?: string)
List volumes, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Volume resource state
@swamp/hetzner-cloud/zonesv2026.05.28.1zones.ts

Global Arguments

ArgumentTypeDescription
labels?recordUser-defined labels (`key/value` pairs) for the Resource.\nFor more information, see "[Labels](#description/labels)".\n
namestringName of the [Zone](#tag/zones).\n\nAll names with [well-known public suffixes](https://publicsuffix.org/) (e.g. `.de`,\n`.com`, `.co.uk`) are supported. Subdomains are not supported.\n\nThe name must be in lower case and must not end with a dot.\n[Internationalized domain\nnames](https://en.wikipedia.org/wiki/Internationalized_domain_name) must be\ntranscribed to [Punycode](https://wikipedia.org/wiki/Punycode) representation with\nACE prefix, e.g. `xn--mnchen-3ya.de` (`münchen.de`).\n
modeenumMode of the [Zone](#tag/zones).\n\nFor more information, see [Zone Modes](#tag/zones/zone-modes).\n
ttl?numberDefault Time To Live (TTL) of the [Zone](#tag/zones).\n\nMust be in between 60s and 2147483647s.\n\nThis TTL is used for [RRSets](#tag/zone-rrsets) that do not explicitly define a TTL.\n
primary_nameservers?arrayPrimary nameservers of the [Zone](#tag/zones).\n\nOnly applicable for [Zones](#tag/zones) in secondary mode.\nIgnored for [Zones](#tag/zones) in primary mode.\n
rrsets?array[RRSets](#tag/zone-rrsets) to be added to the [Zone](#tag/zones).\n\nOnly applicable for [Zones](#tag/zones) in primary mode.\nIgnored for [Zones](#tag/zones) in secondary mode.\n
zonefile?stringZone file to import.\n\nOnly applicable for [Zones](#tag/zones) in primary mode.\nIgnored for [Zones](#tag/zones) in secondary mode.\n\nIf provided, `rrsets` must be empty.\n\nSee [Zone file import](#tag/zones/zone-file-import) for more details.\n
token?stringHetzner API token; overrides the HETZNER_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
fn create()
Create a zone
fn get(id: number)
Get a zone
ArgumentTypeDescription
idnumberThe ID of the zone
fn update()
Update zone attributes
fn delete(id: number)
Delete the zone
ArgumentTypeDescription
idnumberThe ID of the zone
fn sync()
Sync zone state from Hetzner
fn list(label_selector?: string)
List zones, optionally filtered by a Hetzner label selector
ArgumentTypeDescription
label_selector?stringHetzner label selector to filter results, e.g. env=production,role!=db

Resources

state(infinite)— Zone resource state
04Previous Versions15
2026.05.28.1May 28, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones

Modified 11 models

2026.05.01.1May 1, 2026
2026.04.23.4Apr 23, 2026
2026.04.23.2Apr 23, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.04.22.1Apr 22, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.04.03.2Apr 3, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.04.02.1Apr 2, 2026
  • Updated: servers
2026.03.23.1Mar 23, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.03.16.1Mar 16, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.03.10.5Mar 10, 2026
2026.03.10.4Mar 10, 2026
2026.03.10.3Mar 10, 2026
2026.03.08.2Mar 8, 2026
  • Updated: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.03.08.1Mar 8, 2026
  • Added: certificates, firewalls, floating_ips, load_balancers, networks, placement_groups, primary_ips, servers, ssh_keys, volumes, zones
2026.03.07.1Mar 7, 2026
05Stats
A
100 / 100
Downloads
656
Archive size
40.6 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels