hcloud-ruby icon indicating copy to clipboard operation
hcloud-ruby copied to clipboard

[Feature] Label support

Open Kjarrigan opened this issue 5 years ago • 5 comments

https://github.com/hetznercloud/cli/commit/bf798628de328ba8b58c0225bff14f1c8c642dce

Kjarrigan avatar Sep 24 '18 10:09 Kjarrigan

Are you alive?

Kjarrigan avatar Oct 25 '18 10:10 Kjarrigan

Of course ;)

tonobo avatar Oct 25 '18 10:10 tonobo

Any estimate when labels will be available, they would be quite handy for tagging resources for CI.

MarkusFreitag avatar Jan 21 '21 11:01 MarkusFreitag

Hey :wave:

I want to take a look at the labels and just drop some thought here to go over it later.

  • objectives:
    • add, remove, view labels on a resource (https://docs.hetzner.cloud/#labels)
    • filter labels via label selector (https://docs.hetzner.cloud/#label-selector)
  • affected resources: Servers, Floating IPs, Volumes, SSH keys and Images

Example:

# creating a server with labels
c = Hcloud::Client.new(token: "<your project token>")
c.servers.create(name: "moo6", server_type: "cx11", image: "ubuntu-22.04", labels: ["ci", "runner-923fb89a"])

# removing a label
c.servers.remove_label("ci")

RaphaelPour avatar Feb 11 '22 08:02 RaphaelPour

We have additional affected resource types:

  • network
  • upcoming: firewalls

Resource types that also have labels, but are not implemented in this library, yet:

  • certificates
  • load balancers
  • primary IPs
  • placement groups

ghost avatar Nov 16 '22 09:11 ghost