Skip to content

terraform-hetzner-modules/terraform-hetzner-volume

Repository files navigation

Hetzner Cloud - Volume Hetzner Logo Terraform Logo

License Terraform Opentofu CI Status GitHub Release GitHub Activity Renovate Pre-Commit

A Terraform module to create and manage hard disk volumes for your Hetzner Cloud servers.

✨ TL;DR

module "hetzner_volume_apache_server" {
  source = "terraform-hetzner-modules/cloud/volume"
  ...
}

Providers

Name Version
hcloud ~> 1.49

Modules

No modules.

Inputs

Name Description Type Default Required
automount Whether or not to automount the volume after attaching it within Hetzner Cloud. This is exclusively used within the 'hcloud_volume_attachment' resource as not to couple servers. Default is 'true'. bool true no
delete_protection Whether or not to enable delete protection for cloud volume. Default is 'true'. bool true no
format The type of format to use for the cloud volume. Default is 'ext4'. string "ext4" no
location The location for the new Hetzner Cloud volume. This is enforced since it automatically disallows the use of 'server_id' within the 'hcloud_volume' resource so that volumes do NOT get coupled to servers, but instead remain their own separately manageable resource. Default is 'fsn1' and other possible values are 'nbg1', 'hel1', 'ash' or 'hil'. string "fsn1" no
name The name to give to the new Hetzner Cloud volume. string n/a yes
server_id The ID of the Hetzner Cloud server to attach the volume to. This is exclusively used with the 'hcloud_volume_attachment' resource as not to couple servers and volumes like explained within the 'location' variable description. Default is 'null' in order to allow un-attached volumes to be created. number null no
size An integer denoting the size of the volume in Gigabytes. Default is 10. number 10 no

Outputs

Name Description
volume_attachment_id The ID for the new volume attachment.
volume_attachment_server_id The server ID for the new volume attachment.
volume_delete_protection Whether or not delete protection is enabled for the new cloud volume.
volume_id The ID of the new cloud volume.
volume_labels The labels attached to the new cloud volume.
volume_linux_device The device path on the file system for the new cloud volume.
volume_location The Hetzner datacenter location of the new cloud volume.
volume_name The name for the new cloud volume.
volume_size An integer representing the size of the new cloud volume in GB.

🔃 Contributing

Refer to our documentation for contributors for contributing guidelines, commit message formats and versioning tips.

📥 Maintainers

This project is owned and maintained by FMJ Studios refer to the AUTHORS or CODEOWNERS for more information. You may also use the linked contact details to reach out directly.

©️ Copyright

About

💾 Create disk volumes for your Hetzner Cloud servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages