148 lines
4.6 KiB
Text
148 lines
4.6 KiB
Text
|
|
# Hetzner Cloud Provider Defaults - Concrete Configuration Values
|
||
|
|
# Migrated from: provisioning/extensions/providers/hetzner/kcl/
|
||
|
|
|
||
|
|
# Helper functions - resolve appropriate image for OS type
|
||
|
|
let resolve_image_for_os = fun os_type =>
|
||
|
|
if os_type == "debian" then "debian-13"
|
||
|
|
else if os_type == "ubuntu" then "ubuntu-24.04"
|
||
|
|
else if os_type == "nixos" then "ubuntu-24.04"
|
||
|
|
else "debian-13"
|
||
|
|
in
|
||
|
|
|
||
|
|
# Helper function - determine if nixos-anywhere should be enabled
|
||
|
|
let should_enable_nixos_anywhere = fun os_type =>
|
||
|
|
os_type == "nixos"
|
||
|
|
in
|
||
|
|
|
||
|
|
{
|
||
|
|
# Default volume (block storage)
|
||
|
|
volume | default = {
|
||
|
|
name | default = "storage-01",
|
||
|
|
size | default = 20,
|
||
|
|
format | default = "ext4",
|
||
|
|
automount | default = false,
|
||
|
|
delete_on_termination | default = false,
|
||
|
|
protection | default = { delete = false },
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default private network
|
||
|
|
network | default = {
|
||
|
|
name | default = "default-network",
|
||
|
|
ip | default = "10.0.0.2",
|
||
|
|
alias_ips | default = [],
|
||
|
|
protection | default = { delete = false },
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default floating IP
|
||
|
|
floating_ip | default = {
|
||
|
|
name | default = "",
|
||
|
|
type | default = "ipv4",
|
||
|
|
home_location | default = "",
|
||
|
|
description | default = "",
|
||
|
|
dns_ptr | default = "",
|
||
|
|
labels | default = {},
|
||
|
|
protection | default = { delete = false },
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default firewall
|
||
|
|
firewall | default = {
|
||
|
|
name | default = "default-firewall",
|
||
|
|
apply_to | default = [],
|
||
|
|
rules | default = [],
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default Storage Box (external SFTP/Samba/WebDAV storage)
|
||
|
|
storage_box | default = {
|
||
|
|
name | default = "",
|
||
|
|
type | default = "bx11",
|
||
|
|
location | default = "fsn1",
|
||
|
|
enable_ssh | default = true,
|
||
|
|
enable_samba | default = false,
|
||
|
|
enable_webdav | default = false,
|
||
|
|
enable_zfs | default = false,
|
||
|
|
reachable_externally | default = false,
|
||
|
|
ssh_keys | default = [],
|
||
|
|
labels | default = {},
|
||
|
|
subaccounts | default = [],
|
||
|
|
protection | default = { delete = true },
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default server defaults (configuration template)
|
||
|
|
server_defaults_hetzner | default = {
|
||
|
|
provider | default = "hetzner",
|
||
|
|
location | default = "fsn1",
|
||
|
|
server_type | default = "cx11",
|
||
|
|
os_type | default = "debian",
|
||
|
|
image | default = resolve_image_for_os os_type,
|
||
|
|
ssh_keys | default = [],
|
||
|
|
user_data | default = "",
|
||
|
|
volumes | default = [],
|
||
|
|
networks | default = [],
|
||
|
|
firewalls | default = [],
|
||
|
|
labels | default = {},
|
||
|
|
placement_group | default = "",
|
||
|
|
backups | default = false,
|
||
|
|
automount | default = false,
|
||
|
|
protection | default = { delete = false, rebuild = false },
|
||
|
|
nixos_anywhere_enabled | default = should_enable_nixos_anywhere os_type,
|
||
|
|
flake_path | default = "",
|
||
|
|
target_host | default = "",
|
||
|
|
kexec_tarball_url | default = "",
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default Hetzner server configuration
|
||
|
|
server_hetzner | default = {
|
||
|
|
hostname | default = "hetzner-default-server",
|
||
|
|
title | default = "Default Hetzner Server",
|
||
|
|
network_private_ip | default = "",
|
||
|
|
extra_hostnames | default = [],
|
||
|
|
taskservs | default = [],
|
||
|
|
clusters | default = [],
|
||
|
|
provider | default = "hetzner",
|
||
|
|
location | default = "fsn1",
|
||
|
|
server_type | default = "cx11",
|
||
|
|
os_type | default = "debian",
|
||
|
|
image | default = resolve_image_for_os os_type,
|
||
|
|
ssh_keys | default = [],
|
||
|
|
user_data | default = "",
|
||
|
|
volumes | default = [
|
||
|
|
{
|
||
|
|
name | default = "root",
|
||
|
|
size | default = 20,
|
||
|
|
format | default = "ext4",
|
||
|
|
automount | default = false,
|
||
|
|
delete_on_termination | default = true,
|
||
|
|
protection | default = { delete = false },
|
||
|
|
},
|
||
|
|
],
|
||
|
|
networks | default = [],
|
||
|
|
firewalls | default = [],
|
||
|
|
labels | default = { provider = "hetzner" },
|
||
|
|
placement_group | default = "",
|
||
|
|
backups | default = false,
|
||
|
|
automount | default = false,
|
||
|
|
protection | default = { delete = false, rebuild = false },
|
||
|
|
nixos_anywhere_enabled | default = should_enable_nixos_anywhere os_type,
|
||
|
|
flake_path | default = "",
|
||
|
|
target_host | default = "",
|
||
|
|
kexec_tarball_url | default = "",
|
||
|
|
},
|
||
|
|
|
||
|
|
# Default provisioning configuration
|
||
|
|
provision_hetzner | default = {
|
||
|
|
api_url | default = "https://api.hetzner.cloud/v1",
|
||
|
|
api_timeout | default = 30,
|
||
|
|
api_retries | default = 3,
|
||
|
|
default_location | default = "fsn1",
|
||
|
|
default_server_type | default = "cx11",
|
||
|
|
default_os_type | default = "debian",
|
||
|
|
default_image | default = "debian-13",
|
||
|
|
enable_backups | default = false,
|
||
|
|
enable_private_networks | default = true,
|
||
|
|
enable_volumes | default = true,
|
||
|
|
enable_firewalls | default = true,
|
||
|
|
enable_nixos_anywhere | default = false,
|
||
|
|
nixos_anywhere_bootstrap_image | default = "ubuntu-24.04",
|
||
|
|
},
|
||
|
|
}
|