Skip to content

Releases: hetznercloud/hcloud-go

v2.36.0

22 Jan 15:42
219a5d1

Choose a tag to compare

Storage Boxes support is now generally available

The experimental phase for Storage Boxes is over, and Storage Boxes support is now generally available.

Features

  • Storage Box support no longer experimental (#811)
  • server: allow specifying user-data for rebuild (#813)

v2.35.0

16 Jan 10:19
8a968c5

Choose a tag to compare

StorageBoxClient.GetSubaccount no longer gets a subaccount by username

StorageBoxClient.GetSubaccount no longer tries to get a subaccount by username, instead it tries to get it by name.

To get a subaccount by username please use StorageBoxClient.GetSubaccountByUsername.

See the changelog for more details.

Features

  • add name to Storage Box Subaccount (#806)

Bug Fixes

  • do not ignore action error when the error message is empty (#801)

v2.34.0

08 Jan 13:36
edaa297

Choose a tag to compare

ResourceActionClient now has a generic type parameter

The ResourceActionClient struct now has a generic type parameter. The type parameter is used to describe the API resource of the Actions client.

The IResourceActionClient interface that is generated from the ResourceActionClient struct, is also affected by this change.

This API was never intended to be used directly and we did not find any usage of it in public code. So while potentially breaking, the benefits of this change out weighted the risks of doing it.

Features

  • retry request on API timeout error (#797)
  • list actions for a given resource (#791)

v2.33.0

19 Dec 15:36
6684746

Choose a tag to compare

Phasing out datacenters in Primary IPs and Servers

We added a new location property to the request body and response of Servers and Primary IPs. The same data was previously present under datacenter.location.

We deprecated the datacenter property in the request body and response of Servers and Primary IPs. The removal will happen after 1 July 2026.

See our changelog for more details.

Features

  • add update rrset records action to zone client (#773)
  • deprecate datacenter in primary ips and servers (#793)
  • default to max per page value in AllWithOpts (#794)

v2.32.0

25 Nov 14:00
91b5dd3

Choose a tag to compare

Features

  • error helper to remove correlation ID (#775)

v2.31.0

18 Nov 11:15
60d5032

Choose a tag to compare

Features

  • add running actions ids to done context error (#765)

Bug Fixes

  • exp: support text/plain content type with mockutil (#771)

v2.30.0

10 Nov 10:50
19defdf

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.

Features

  • DNS support is now generally available (#763)

v2.29.0

30 Oct 10:46
a906ebd

Choose a tag to compare

Features

  • exp: add TXT record helpers (#757)

v2.28.0

21 Oct 09:24
a31266b

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 21 November 2025. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API.

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

Examples

result, _, err := client.StorageBox.Create(ctx, hcloud.StorageBoxCreateOpts{
	Name:           "my-storage-box",
	StorageBoxType: &hcloud.StorageBoxType{Name: "bx11"},
	Location:       &hcloud.Location{Name: "fsn1"},
	Password:       "my-secure-password",
	SSHKeys: []*hcloud.SSHKey{{ PublicKey: "ssh-rsa AAAAB3NzaC1yc2E..." }},
	Labels:         map[string]string{"key": "value"},
	AccessSettings: &hcloud.StorageBoxCreateOptsAccessSettings{
		ReachableExternally: hcloud.Ptr(true),
		SSHEnabled:          hcloud.Ptr(true),
	},
})

err = client.Action.WaitFor(ctx, result.Action)

Features

  • retrieve a server or load balancer network attachment (#750)
  • add support for Storage Boxes (#684)

Bug Fixes

  • deprecate firewall_already_removed error code (#748)
  • invalid property in network add_subnet request body (#751)

v2.27.0

07 Oct 08:20
7a591b7

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

result, _, err := client.Zone.Create(ctx, hcloud.ZoneCreateOpts{
	Name:   "example.com",
	Mode:   hcloud.ZoneModePrimary,
	Labels: map[string]string{"key": "value"},
	RRSets: []hcloud.ZoneCreateOptsRRSet{
		{
			Name: "@",
			Type: hcloud.ZoneRRSetTypeA,
			Records: []hcloud.ZoneRRSetRecord{
				{Value: "201.180.75.2", Comment: "server1"},
			},
		},
	},
})

err = client.Action.WaitFor(ctx, result.Action)
zone = result.Zone

Features

  • support the new DNS API (#740)