Releases: hetznercloud/terraform-provider-hcloud
v1.58.0
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_serverdata.hcloud_serverdata.hcloud_servershcloud_primary_ipdata.hcloud_primary_ipdata.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
v1.57.0
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
v1.56.0
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
v1.55.0
v1.54.0
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
v1.53.0
Server Types now depend on Locations.
-
We added a new
locationsproperty 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
deprecationproperty 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}"
}
}