2021-03-10 22:12:57 +00:00
|
|
|
# abra-hetzner
|
|
|
|
|
2021-03-10 22:26:44 +00:00
|
|
|
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/abra-hetzner/status.svg?ref=refs/heads/main)](https://drone.autonomic.zone/coop-cloud/abra-hetzner)
|
|
|
|
|
2021-04-07 17:39:15 +00:00
|
|
|
Hetzner plugin for `abra`. See [abra](https://git.autonomic.zone/coop-cloud/abra) for more.
|
|
|
|
|
|
|
|
The script can be run on its own like so.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ ./abra-hetzner my-new-vps cx11 debian-10 --ssh-keys foo@example.com
|
|
|
|
```
|
2021-04-07 16:25:13 +00:00
|
|
|
|
2021-04-07 17:49:49 +00:00
|
|
|
It assumes a `$ABRA_DIR/vendor/jq` binary installation of [jq](https://stedolan.github.io/jq/tutorial/).
|
|
|
|
|
2021-04-07 16:25:13 +00:00
|
|
|
## Hacking
|
|
|
|
|
|
|
|
You can read the Hetzner Cloud API docs (e.g. [locations endpoint](https://docs.hetzner.cloud/#locations)).
|
|
|
|
|
|
|
|
Then you can make requests and see what comes out. These values can then fed into this plugin as configurables.
|
|
|
|
|
|
|
|
```bash
|
2021-04-07 17:36:49 +00:00
|
|
|
$ export HETZNER_API_TOKEN=<hetzner-api-token>
|
|
|
|
$ curl -H "Authorization: Bearer $HETZNER_API_TOKEN" 'https://api.hetzner.cloud/v1/locations' | jq '.locations | .[] | .name'`
|
2021-04-07 16:25:13 +00:00
|
|
|
"fsn1"
|
|
|
|
"nbg1"
|
|
|
|
"hel1"
|
|
|
|
```
|