fix(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.25.0

This MR contains the following updates:

Package Change Age Confidence
github.com/hetznercloud/hcloud-go/v2 v2.24.0 -> v2.25.0 age confidence

Release Notes

hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)

v2.25.0

Compare Source

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
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
}
Features
  • exp: add sliceutil.Transform function (#​731)
  • per locations server types (#​730)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports

Loading