salt.cloud.clouds.hetzner

Hetzner Cloud Module

The Hetzner cloud module is used to control access to the hetzner cloud. https://docs.hetzner.cloud/

depends

hcloud >= 1.10

Use of this module requires the key parameter to be set.

my-hetzner-cloud-config:
  key: <your api key>
  driver: hetzner
salt.cloud.clouds.hetzner.avail_images(call=None)

Return a dictionary of available images

salt.cloud.clouds.hetzner.avail_locations(call=None)

Return a dictionary of available locations

salt.cloud.clouds.hetzner.avail_sizes(call=None)

Return a dictionary of available VM sizes

salt.cloud.clouds.hetzner.create(vm_)

Create a single VM from a data dict

salt.cloud.clouds.hetzner.destroy(name, call=None)

Destroy a node.

CLI Example:

salt-cloud --destroy mymachine
salt.cloud.clouds.hetzner.get_configured_provider()

Return the first configured instance.

salt.cloud.clouds.hetzner.get_dependencies()

Warn if dependencies aren't met.

salt.cloud.clouds.hetzner.list_nodes(call=None)

Return a dictionary of existing VMs in the current project, containing basic details of each VM

salt.cloud.clouds.hetzner.list_nodes_full(call=None)

Return a dictionary of existing VMs in the current project, containing full details per VM

salt.cloud.clouds.hetzner.list_ssh_keys(call=None)

Return a dictionary of available SSH keys configured in the current project

salt.cloud.clouds.hetzner.reboot(name, call=None, wait=True)

Reboot a node.

CLI Example:

salt-cloud -a reboot mymachine
salt.cloud.clouds.hetzner.resize(name, kwargs, call=None)

Resize a node.

CLI Example:

salt-cloud -a resize mymachine size=...
salt.cloud.clouds.hetzner.show_instance(name, call=None)

Return the details of a specific VM

salt.cloud.clouds.hetzner.start(name, call=None, wait=True)

Start a node.

CLI Example:

salt-cloud -a start mymachine
salt.cloud.clouds.hetzner.stop(name, call=None, wait=True)

Stop a node.

CLI Example:

salt-cloud -a stop mymachine
salt.cloud.clouds.hetzner.wait_until(name, state, timeout=300)

Wait until a specific state has been reached on a node