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}"
|
||||
}
|
||||
|
||||
@@ -5,8 +5,3 @@ output "ipv4" {
|
||||
output "private_ipv4" {
|
||||
value = var.private_ip
|
||||
}
|
||||
|
||||
output "data_dir" {
|
||||
description = "Deterministic host path of the auto-mounted volume - see local.data_dir."
|
||||
value = local.data_dir
|
||||
}
|
||||
|
||||
@@ -28,11 +28,6 @@ variable "private_ip" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "volume_size" {
|
||||
description = "Size in GB of the volume attached to prod (disk1 in docs/architecture.md)."
|
||||
type = number
|
||||
}
|
||||
|
||||
variable "allowed_ssh_source_ips" {
|
||||
description = "CIDRs allowed to reach port 22 on prod. Set by the root module to the vpn server's public IP."
|
||||
type = list(string)
|
||||
|
||||
Reference in New Issue
Block a user