Skip to content

Terraform module to manage the following Hetzner Cloud resources (hcloud_server, hcloud_server_network, hcloud_snapshot))

License

Notifications You must be signed in to change notification settings

dhoppeIT/terraform-hcloud-server

Repository files navigation

terraform-hcloud-server

Terraform module to manage the following Hetzner Cloud resources:

  • hcloud_server
  • hcloud_server_network
  • hcloud_snapshot

Graph

Graph

Usage

Copy and paste into your Terraform configuration, insert the variables and run terraform init:

module "hcloud_server" {
  source  = "dhoppeIT/server/hcloud"
  version = "~> 0.1"

  name        = "debian"
  server_type = "cx11"
  image       = "debian-10"
}

Requirements

Name Version
terraform >= 1.0
hcloud ~> 1.25

Providers

Name Version
hcloud 1.36.0

Modules

No modules.

Resources

Name Type
hcloud_server.default resource
hcloud_server_network.default resource
hcloud_snapshot.default resource

Inputs

Name Description Type Default Required
alias_ips Additional IPs to be assigned to this server list(string) [] no
backups Enable or disable backups bool false no
create_server_network Whether to create server network bool false no
create_snapshot Whether to create server snapshot bool false no
datacenter The datacenter name to create the server in string null no
delete_protection Enable or disable delete protection bool false no
description Description of the snapshot string null 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 n/a yes
ip IP to request to be assigned to this server string null no
iso ID or Name of an ISO image to mount string null no
keep_disk If true, do not upgrade the disk 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 string n/a yes
network_id ID of the network which should be added to the server number null no
rebuild_protection Enable or disable rebuild protection bool false no
rescue Enable and boot in to the specified rescue system string null no
server_type Name of the server type this server should be created with string n/a yes
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

Name Description
id Unique ID of the server
ipv4_address_private The private IPv4 address
ipv4_address_public The public IPv4 address
name Name of the server

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.

About

Terraform module to manage the following Hetzner Cloud resources (hcloud_server, hcloud_server_network, hcloud_snapshot))

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages