Skip to content

v2.45.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Jul 11:20
3ba8c30

Removed deprecated Datacenter property from Server and PrimaryIP

Removed the deprecated Datacenter property from the Server and PrimaryIP resources. Since the property was already removed from the Hetzner Cloud API, we do not consider this a breaking change (see changelog entry).

Important

Action required: Please update all code that accesses Server.Datacenter or PrimaryIP.Datacenter to use the Location property instead, as shown below.

Before:

server, _, _ := client.Server.GetByID(ctx, 42)
fmt.Println(server.Datacenter.Location.Name)

primaryIP, _, _ := client.PrimaryIP.GetByID(ctx, 7)
fmt.Println(primaryIP.Datacenter.Location.Name)

After:

server, _, _ := client.Server.GetByID(ctx, 42)
fmt.Println(server.Location.Name)

primaryIP, _, _ := client.PrimaryIP.GetByID(ctx, 7)
fmt.Println(primaryIP.Location.Name)

Features

  • action: add missing ActionResourceType constants (#862) (77a6fae)
  • remove datacenter property from server and primary_ip (#890) (298cccc)