This module provisions a Hetzner Cloud server instance.
module "cloud-server" {
source = "github.com/knoedel/terraform-cloud-server"
<variables>
}
Name | Version |
---|---|
terraform | ~> 1.0 |
cloudinit | 2.2.0 |
hcloud | 1.31.1 |
Name | Version |
---|---|
cloudinit | 2.2.0 |
hcloud | 1.31.1 |
No modules.
Name | Type |
---|---|
hcloud_server.server | resource |
hcloud_server_network.external | resource |
hcloud_server_network.internal | resource |
cloudinit_config.main | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
domain | The domain name of your cloud server. | string |
n/a | yes |
external_network_id | The id of the external network to connect your cloud server to. | number |
n/a | yes |
firewall_ids | The ids of the firewall rule sets to apply on your cloud server. | list(number) |
[] |
no |
internal_network_id | The id of the internal network to connect your cloud server to. | number |
n/a | yes |
mounts | The list of volumes to mount on your cloud server. | list(object({ |
[] |
no |
puppet_role | The Puppet role to assign to your cloud server. | string |
n/a | yes |
puppet_server | The address of your Puppet server that your cloud server should connect to. | string |
n/a | yes |
puppet_zone | The Puppet zone to assign to your cloud server. | string |
n/a | yes |
server_image | The name or id of the image of your cloud server. | string |
"ubuntu-20.04" |
no |
server_location | The location where to place your cloud server in. | string |
"nbg1" |
no |
server_name | The name of your cloud server. Must be unique per project and a valid hostname as per RFC 1123. | string |
n/a | yes |
server_type | The type of your cloud server. | string |
"cx11" |
no |
ssh_key_id | The id of the ssh key that is allowed to connect to your cloud server. | number |
n/a | yes |
user_data | The cloud-init configuration to apply to your cloud server. | string |
n/a | yes |
Name | Description |
---|---|
external_ip | The external IPv4 address of your cloud server |
internal_ip | The internal IPv4 address of your cloud server |
ipv4 | The public IPv4 address of your cloud server |
ipv6 | The public IPv6 address of your cloud server |
server_id | The id of your cloud server |
Install dependencies (macOS)
brew install pre-commit go terraform terraform-docs
make ensure_pre_commit
Terratest is being used for
automated testing with this module. Tests in the test
folder can be run
locally by running the following command:
make test