Skip to content

Releases: hetznercloud/terraform-provider-hcloud

v1.58.0

05 Jan 15:44
8c20caa

Choose a tag to compare

Breaking Change for the Storage Box resource

Previously the hcloud_storage_box resource ignored any changes to the ssh_keys attribute to avoid accidentally deleting the Storage Box (SSH Keys can not be changed through the API after the Storage Box is created).

This is changed in this release, we now mark the resource as "requires replacement" if the SSH Keys are changed. If you want to ignore changes and keep the previous behaviour, please add the attribute to lifecycle.ignore_changes:

resource "hcloud_storage_box" "example" {
  // Other attributes

  ssh_keys = [ "..." ]
  lifecycle {
    ignore_changes = [ ssh_keys ]
  }
}

We are releasing this breaking change in a minor version as the Storage Box support is marked as experimental.

Deprecation of datacenter attribute for Primary IPs and Servers

The datacenter attributes is deprecated in Primary IPs and Servers API resources and will be removed after 1 July 2026. See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters for more details.

Therefore, datacenter attributes is deprecated in favour of the location attribute in the following Terraform resources/datasources:

  • hcloud_server
  • data.hcloud_server
  • data.hcloud_servers
  • hcloud_primary_ip
  • data.hcloud_primary_ip
  • data.hcloud_primary_ips

The location attribute already exists for Servers, and was added for Primary IPs.

The datacenter attribute will not be updated any more after it is no longer returned by the API. For existing resources this will keep the previous value, for new resources this will result in an empty string.

Please make sure to upgrade to v1.58.0+ before the removal date to avoid potential crashes in the provider.

Features

  • drop support for OpenTofu v1.8
  • add support for OpenTofu v1.11
  • storage-box: stop ignoring changes to ssh keys and replace resource instead (#1296)
  • deprecate datacenter in primary ips and servers (#1309)

Bug Fixes

  • storage-box: run actions serially (#1294)
  • zone: using variable for primary nameservers causes error (#1306)
  • storage-box: retry snapshot+subaccount create when locked (#1307)

v1.57.0

28 Nov 12:04
dc14c30

Choose a tag to compare

Storage Box API Experimental

This release adds support for the Storage Box API.

The Storage Box integration will be introduced as an experimental feature. This experimental phase is expected to last until 2 January 2026. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API. You can find out the current state of this in #1285.

This release includes all changes from the recent Storage Box API changelog entry.

Examples

resource "hcloud_storage_box" "backups" {
  name             = "backups"
  storage_box_type = "bx21"
  location         = "hel1"
  password         = var.storage_box_password
}

resource "hcloud_storage_box_snapshot" "tool_xyz_migration" {
  storage_box_id = hcloud_storage_box.backups.id

  description = "Before Tool XYZ Migration"
  labels = {
    env = "production"
  }
}

resource "hcloud_storage_box_subaccount" "team_badger" {
  storage_box_id = hcloud_storage_box.backups.id

  home_directory = "teams/badger/"
  password       = var.team_badger_password
}

Features

  • drop builds for windows arm (32 bit) (#1260)
  • drop support for terraform v1.11
  • drop support for terraform v1.12
  • add support for terraform v1.13
  • add support for terraform v1.14
  • add support for Storage Boxes (#1166)

Bug Fixes

  • abort when data transformation errors (#1253)
  • ensure partially created resources are tainted in the state (#1257)
  • dns records order is not guaranteed (#1259)

v1.56.0

10 Nov 11:20
6b74982

Choose a tag to compare

DNS API is now generally available

The DNS API is now generally available, as well as support for features in this project that are related to the DNS API.

To migrate existing zones to the new DNS API, see the DNS migration guide.

See the changelog for more details.

Server and load balancer network attachment

With this release, the hcloud_server_network and hcloud_load_balancer_network resource now supports assigning a server or load balancer to a specific network subnet using the subnet_id attribute. The subnet_id attribute also validates that the network_id and ip attributes are consistent with the subnet_id. If they are not consistent, the resource will be replaced.

In the hcloud_server_network resource, the alias_ips attribute now defaults to an empty set when undefined.

Features

  • attach server to a specific network subnet (#1217)
  • attach load balancer to a specific network subnet (#1242)
  • DNS support is now generally available (#1247)

v1.55.0

07 Nov 13:20
69cef1f

Choose a tag to compare

Features

  • support managing records of type SOA (#1225)
  • firewall: importing firewall attachments (#1231)
  • add txt_record helper function (#1227)

Bug Fixes

  • load-balancer: mark health check retries as required (#1232)

v1.54.0

07 Oct 09:04
3028d94

Choose a tag to compare

DNS API Beta

This release adds support for the new DNS API.

The DNS API is currently in beta, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the DNS Beta FAQ for more details.

Future minor releases of this project may include breaking changes for features that are related to the DNS API.

See the DNS API Beta changelog for more details.

Examples

resource "hcloud_zone" "example" {
  name = "example.com"
  mode = "primary"
  labels = {
    key = "value"
  }
}

resource "hcloud_zone_rrset" "apex_a_example" {
  zone = hcloud_zone.example.name
  name = "@"
  type = "A"
  records = [
    { value = "201.78.10.45", comment = "server1" },
  ]
}

Features

  • support the new DNS API (#1210)

v1.53.1

26 Sep 17:40
72382dd

Choose a tag to compare

Bug Fixes

  • show warnings using diagnostics instead of logs (#1197)
  • also check server type deprecation after server creation (#1201)

v1.53.0

26 Sep 08:15
6acfeba

Choose a tag to compare

Server Types now depend on Locations.

  • We added a new locations property to the Server Types resource. The new property defines a list of supported Locations and additional per Locations details such as deprecations information.

  • We deprecated the deprecation property from the Server Types resource. The property will gradually be phased out as per Locations deprecations are being announced. Please use the new per Locations deprecation information instead.

See our changelog for more details.

Upgrading

// Before
data "hcloud_server_type" "main" {
  name = "cx22"
}

check "server_type" {
  assert {
    condition     = !data.hcloud_server_type.main.is_deprecated
    error_message = "Server Type ${data.hcloud_server_type.main.name} is deprecated"
  }
}
// After
data "hcloud_location" "main" {
  name = "fsn1"
}

data "hcloud_server_type" "main" {
  name = "cx22"
}

locals {
  server_type_location = one([
    for o in data.hcloud_server_type.main.locations : o
    if o.name == data.hcloud_location.main.name
  ])
}

check "server_type_location" {
  assert {
    condition     = local.server_type_location != null
    error_message = "Server Type ${data.hcloud_server_type.main.name} does not exists in Location ${data.hcloud_location.main.name}"
  }
  assert {
    condition     = !local.server_type_location.is_deprecated
    error_message = "Server Type ${data.hcloud_server_type.main.name} is deprecated in Location ${data.hcloud_location.main.name}"
  }
}

Features

  • add category property to server type (#1184)
  • per locations server types (#1193)

Bug Fixes

  • ensure exponential poll backoff is configured (#1160)
  • handle not found volume deletion (#1189)
  • wait for floating_ip assign action to complete (#1195)
  • add experimental features maturity (#1191)

v1.52.0

28 Jul 08:29
ec8c6f8

Choose a tag to compare

Features

  • drop support for terraform v1.9 (#1125)
  • drop support for terraform v1.10 (#1126)
  • add support for terraform v1.11 (#1127)
  • add support for terraform v1.12 (#1128)
  • warn when experimental features are used (#1155)
  • drop support for opentofu v1.7 (#1158)
  • add support for opentofu v1.10 (#1159)

v1.51.0

20 May 10:54
dfe49f0

Choose a tag to compare

Features

  • server: add private networks in data_source (#1115)

v1.50.1

24 Apr 10:56
d6c7066

Choose a tag to compare

Bug Fixes

  • missing assignee_type in assign primary ip call (#1117)