Heztner Cloud Server Terraform module
Terraform module which creates a server on Hetzner Cloud.
Usage
Single Server
Multiple Servers
Requirements
Providers
Modules
No modules.
Resources
Inputs
Name |
Description |
Type |
Default |
Required |
alias_ips |
Additional IPs to be assigned to this server. |
list(string) |
[] |
no |
attach_private_network |
If true, attach server to an existing private network. |
bool |
false |
no |
backups |
Enable or disable backups. |
bool |
false |
no |
delete_protection |
Enable or disable delete protection. |
bool |
false |
no |
firewall_ids |
Firewall IDs the server should be attached to on creation. |
list(string) |
[] |
no |
image |
Name or ID of the image the server is created from. |
string |
"debian-11" |
no |
ip |
IP to request to be assigned to this server. |
string |
null |
no |
keep_disk |
If true, do not upgrade the disk. This allows downgrading the server type later. |
bool |
false |
no |
labels |
User-defined labels (key-value pairs) should be created with. |
map(string) |
{} |
no |
location |
The location name to create the server in. |
string |
null |
no |
name |
Name of the server to create (must be unique per project and a valid hostname as per RFC 1123). |
string |
n/a |
yes |
network_id |
ID of the network which should be added to the server. |
number |
null |
no |
placement_group_id |
Placement Group ID the server added to on creation. |
string |
null |
no |
primary_ipv4_id |
ID of existing or external IPv4 address. |
string |
null |
no |
primary_ipv6_id |
ID of existing or external IPv6 address. |
string |
null |
no |
public_ipv4_enabled |
Enable or disable public IPv4 address. |
bool |
true |
no |
public_ipv6_enabled |
Enable or disable public IPv6 address. |
bool |
true |
no |
rdns |
Domain for reverse DNS entry. |
string |
null |
no |
rebuild_protection |
Enable or disable rebuild protection. |
bool |
false |
no |
server_type |
Name of the server type this server should be created with. |
string |
"cx11" |
no |
ssh_keys |
SSH key IDs or names which should be injected into the server at creation time. |
list(string) |
[] |
no |
subnet_id |
ID of the sub-network which should be added to the server. |
string |
null |
no |
user_data |
Cloud-Init user data to use during server creation. |
string |
null |
no |
Outputs
License
MIT Licensed. See LICENSE for full details.