|
2 | 2 |
|
3 | 3 | This repository provides the functionality to deploy the github actions runner on the hetzner cloud infrastructure. This repository is used to set up the test infrastructure for the fylr application. |
4 | 4 |
|
5 | | -## Avaiable variables |
6 | | - |
7 | | -| Variable | Type | Default value | Description | |
8 | | -|----------|------|---------------|-------------| |
9 | | -| `hcloud_token` | string | "" | Defines the authentication token with which new machines are registered with the [hetzner cloud](https://www.hetzner.com/cloud). | |
10 | | -| `ssh_private_key` | string | "~/.ssh/id_rsa" | Defines the path to the location of the private key. The private key is used together with the public key to connect to the machine. | |
11 | | -| `ssh_public_key` | string | "~/.ssh/id_rsa.pub" | Defines the path to the location of the public key. The public key is used together with the private key to connect to the machine. | |
12 | | -| `ssh_key_name` | string | `admin_ssh_key` | Defines the name for the ssh key added to the hetzner cloud, as defined in ssh_private_key and ssh_public_key. Must be different from hetzner_additional_public_key_ids. | |
13 | | -| `hetzner_machine_type` | string | "cx11" | Sets the machine type to use. | |
14 | | -| `hetzner_machine_os` | string | "debian-10" | Defines the machine operating system to be installed. | |
15 | | -| `hetzner_additional_public_key_ids` | []string | [] | Adds public keys to the server that are already registered with hetzner | |
16 | | -| `hetzner_machine_additional_packages` | string | "" | Defines additional packages that must be installed on the machine. Each package name must be separated by a space ` `. | |
17 | | -| `hetzner_machine_location` | string | nbg1 | Specifies the location of the data center where the machine is to be deployed. | |
18 | | -| `github_actions_runner_count` | number | 1 | Defines the number of runners to be provided. This option is equal to Machines at hetzner. | |
19 | | -| `github_actions_runner_labels` | string | "" | Defines a list of labels used to identify the runners. The list is divided by separating the individual entries with `,`. | |
20 | | -| `github_actions_runner_replace_existing` | bool | false | Specifies whether to replace existing Github action runners with the same name. | |
21 | | -| `github_owner` | string | "" | Defines the organisation name or repository owner. | |
22 | | -| `github_repository_name` | string | "" | Sets the name of the repository. This option is only used if you use self-hosted Github runners at the repository level. | |
23 | | -| `github_authentication_user` | string | | Sets the user used for issuing new registration tokens. Ensure that the user has the appropriate permissions. | |
24 | | -| `github_authentication_token` | string | | Sets the personal access token for the configured user in the variable github_authentication_user. | |
25 | | -| `github_runner_type` | string | "repo" | Defines the github runner type. Available values are: repo, org | |
26 | | - |
27 | 5 | ## Example terraform.tfvars, which provides the runners at repository level |
28 | 6 |
|
29 | 7 | ```ini |
@@ -72,3 +50,61 @@ ssh_key_name="example-bot-ssh-key" |
72 | 50 |
|
73 | 51 | github_runner_type="org" |
74 | 52 | ``` |
| 53 | + |
| 54 | +## Requirements |
| 55 | + |
| 56 | +| Name | Version | |
| 57 | +|------|---------| |
| 58 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= v1.2.9 | |
| 59 | +| <a name="requirement_hcloud"></a> [hcloud](#requirement\_hcloud) | >= 1.35.1 | |
| 60 | + |
| 61 | +## Providers |
| 62 | + |
| 63 | +| Name | Version | |
| 64 | +|------|---------| |
| 65 | +| <a name="provider_hcloud"></a> [hcloud](#provider\_hcloud) | 1.35.1 | |
| 66 | + |
| 67 | +## Modules |
| 68 | + |
| 69 | +| Name | Source | Version | |
| 70 | +|------|--------|---------| |
| 71 | +| <a name="module_hetzner_gh_runners"></a> [hetzner\_gh\_runners](#module\_hetzner\_gh\_runners) | ./modules/actions-runner | n/a | |
| 72 | + |
| 73 | +## Resources |
| 74 | + |
| 75 | +| Name | Type | |
| 76 | +|------|------| |
| 77 | +| [hcloud_ssh_key.admin_ssh_key](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs/resources/ssh_key) | resource | |
| 78 | + |
| 79 | +## Inputs |
| 80 | + |
| 81 | +| Name | Description | Type | Default | Required | |
| 82 | +|------|-------------|------|---------|:--------:| |
| 83 | +| <a name="input_github_actions_runner_count"></a> [github\_actions\_runner\_count](#input\_github\_actions\_runner\_count) | Defines the number of runners to be provided. This option is equal to Machines at hetzner. | `number` | `1` | no | |
| 84 | +| <a name="input_github_actions_runner_labels"></a> [github\_actions\_runner\_labels](#input\_github\_actions\_runner\_labels) | Defines a list of labels used to identify the runners. The list is divided by separating the individual entries with `,`. | `string` | `""` | no | |
| 85 | +| <a name="input_github_actions_runner_replace_existing"></a> [github\_actions\_runner\_replace\_existing](#input\_github\_actions\_runner\_replace\_existing) | Specifies whether to replace existing Github action runners with the same name. | `bool` | `false` | no | |
| 86 | +| <a name="input_github_authentication_token"></a> [github\_authentication\_token](#input\_github\_authentication\_token) | Sets the personal access token for the configured user in the variable github\_authentication\_user. | `string` | n/a | yes | |
| 87 | +| <a name="input_github_authentication_user"></a> [github\_authentication\_user](#input\_github\_authentication\_user) | Sets the user used for issuing new registration tokens. Ensure that the user has the appropriate permissions. | `string` | n/a | yes | |
| 88 | +| <a name="input_github_owner"></a> [github\_owner](#input\_github\_owner) | Defines the organisation name or repository owner. | `string` | `""` | no | |
| 89 | +| <a name="input_github_repository_name"></a> [github\_repository\_name](#input\_github\_repository\_name) | Sets the name of the repository. This option is only used if you use self-hosted Github runners at the repository level. | `string` | `""` | no | |
| 90 | +| <a name="input_github_runner_release"></a> [github\_runner\_release](#input\_github\_runner\_release) | Defines the version of the github runner to be installed. The version must be specified in the format `2.277.1`. | `string` | `"2.298.1"` | no | |
| 91 | +| <a name="input_github_runner_type"></a> [github\_runner\_type](#input\_github\_runner\_type) | Defines the github runner type. Available values are: repo, org | `string` | `"repo"` | no | |
| 92 | +| <a name="input_hcloud_token"></a> [hcloud\_token](#input\_hcloud\_token) | Hetzner Cloud API token | `string` | n/a | yes | |
| 93 | +| <a name="input_hetzner_additional_public_key_ids"></a> [hetzner\_additional\_public\_key\_ids](#input\_hetzner\_additional\_public\_key\_ids) | Adds public keys to the server that are already registered at hetzner | `list(string)` | `[]` | no | |
| 94 | +| <a name="input_hetzner_ip_config"></a> [hetzner\_ip\_config](#input\_hetzner\_ip\_config) | Defines the IP configuration for the machine. The IP configuration is used to assign a static IP address to the machine. | <pre>object({<br> ipv4_enabled = bool<br> ipv6_enabled = bool<br> })</pre> | <pre>{<br> "ipv4_enabled": true,<br> "ipv6_enabled": true<br>}</pre> | no | |
| 95 | +| <a name="input_hetzner_machine_additional_packages"></a> [hetzner\_machine\_additional\_packages](#input\_hetzner\_machine\_additional\_packages) | Defines additional packages that must be installed on the machine. Each package name must be separated by a space ` `. | `string` | `""` | no | |
| 96 | +| <a name="input_hetzner_machine_location"></a> [hetzner\_machine\_location](#input\_hetzner\_machine\_location) | Specifies the location of the data center where the machine is to be deployed. | `string` | `"nbg1"` | no | |
| 97 | +| <a name="input_hetzner_machine_os"></a> [hetzner\_machine\_os](#input\_hetzner\_machine\_os) | Defines the machine operating system to be installed. | `string` | `"debian-10"` | no | |
| 98 | +| <a name="input_hetzner_machine_type"></a> [hetzner\_machine\_type](#input\_hetzner\_machine\_type) | Sets the machine type to use. | `string` | `"cx11"` | no | |
| 99 | +| <a name="input_ssh_key_name"></a> [ssh\_key\_name](#input\_ssh\_key\_name) | Defines the name for the ssh key | `string` | `"admin_ssh_key"` | no | |
| 100 | +| <a name="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key) | Defines the path to the location of the private key. The private key is used together with the public key to connect to the machine. | `string` | `"~/.ssh/id_rsa"` | no | |
| 101 | +| <a name="input_ssh_public_key"></a> [ssh\_public\_key](#input\_ssh\_public\_key) | Public Key to authorized the access to the machines | `string` | `"~/.ssh/id_rsa.pub"` | no | |
| 102 | +| <a name="input_ssh_username"></a> [ssh\_username](#input\_ssh\_username) | Username that should be used to connect to the nodes | `string` | `"root"` | no | |
| 103 | + |
| 104 | +## Outputs |
| 105 | + |
| 106 | +| Name | Description | |
| 107 | +|------|-------------| |
| 108 | +| <a name="output_runner_ipv4_addresses"></a> [runner\_ipv4\_addresses](#output\_runner\_ipv4\_addresses) | n/a | |
| 109 | +| <a name="output_runner_ipv6_addresses"></a> [runner\_ipv6\_addresses](#output\_runner\_ipv6\_addresses) | n/a | |
| 110 | +| <a name="output_runner_machine_names"></a> [runner\_machine\_names](#output\_runner\_machine\_names) | n/a | |
0 commit comments