Releases: hetznercloud/hcloud-go
v2.30.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.
Features
- DNS support is now generally available (#763)
v2.29.0
v2.28.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 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
Bug Fixes
v2.27.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
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.ZoneFeatures
- support the new DNS API (#740)
v2.26.0
v2.25.1
v2.25.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
func ValidateServerType(serverType *hcloud.ServerType) error {
if serverType.IsDeprecated() {
return fmt.Errorf("server type %s is deprecated", serverType.Name)
}
return nil
}// After
func ValidateServerType(serverType *hcloud.ServerType, location *hcloud.Location) error {
serverTypeLocationIndex := slices.IndexFunc(serverType.Locations, func(e hcloud.ServerTypeLocation) bool {
return e.Location.Name == location.Name
})
if serverTypeLocationIndex < 0 {
return fmt.Errorf("server type %s is not supported in location %q", serverType.Name, location.Name)
}
if serverType.Locations[serverTypeLocationIndex].IsDeprecated() {
return fmt.Errorf("server type %q is deprecated in location %q", serverType.Name, location.Name)
}
return nil
}