feat: add --location flag to specify datacenter region (#141)

Allow users to specify which Hetzner datacenter location to use for the
temporary server during image upload. Defaults to fsn1 for backward
compatibility.

Available locations: fsn1, nbg1, hel1, ash, hil, sin

Implements: #142
This commit is contained in:
Malthe Poulsen 2025-12-22 13:36:50 +01:00 committed by GitHub
parent a9b16cf07c
commit fcbc14aab6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 3 deletions

View file

@ -24,6 +24,7 @@ func ExampleClient_Upload() {
ImageURL: imageURL,
ImageCompression: hcloudimages.CompressionBZ2,
Architecture: hcloud.ArchitectureX86,
Location: &hcloud.Location{Name: "nbg1"}, // Optional: defaults to fsn1
})
if err != nil {
panic(err)