feat: backup and restore
This commit is contained in:
@@ -91,24 +91,3 @@ resource "hcloud_server" "this" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "hcloud_volume" "storage" {
|
||||
name = "prod-storage"
|
||||
size = var.volume_size
|
||||
server_id = hcloud_server.this.id
|
||||
automount = true
|
||||
format = "ext4"
|
||||
|
||||
lifecycle {
|
||||
prevent_destroy = true
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
# Hetzner's automount convention (hc-utils' 99-hc-volume-automount.rules) is
|
||||
# always /mnt/HC_Volume_<id> - deterministic once the volume exists, since the
|
||||
# id is stable for the volume's lifetime regardless of which server it's
|
||||
# attached to. Kept here only as a human-readable output (see outputs.tf) -
|
||||
# ansible/roles/deploy looks this up itself from the Hetzner API, it doesn't
|
||||
# read this value.
|
||||
data_dir = "/mnt/HC_Volume_${hcloud_volume.storage.id}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user