# Hetzner Volume Module
# Generated by Prism

terraform {
  required_providers {
    hcloud = {
      source = "hetznercloud/hcloud"
    }
  }
}

resource "hcloud_volume" "main" {
  name     = var.name
  size     = var.size
  location = var.location
  format   = "ext4"

  labels = var.labels
}

resource "hcloud_volume_attachment" "main" {
  volume_id = hcloud_volume.main.id
  server_id = var.server_id
  automount = true
}
