feat: integrate tailscale access and lock SSH/API to tailnet
Some checks failed
Deploy Cluster / Terraform (push) Failing after 20s
Deploy Cluster / Ansible (push) Has been skipped

This commit is contained in:
2026-03-01 04:04:56 +00:00
parent f95dfbf9ac
commit 1eebfe77df
9 changed files with 134 additions and 23 deletions

View File

@@ -17,6 +17,14 @@ resource "hcloud_server" "control_plane" {
role = "control-plane"
}
user_data = <<-EOF
#cloud-config
package_update: true
runcmd:
- curl -fsSL https://tailscale.com/install.sh | sh
- tailscale up --authkey '${var.tailscale_auth_key}' --hostname '${var.cluster_name}-cp-${count.index + 1}' --ssh=false --accept-routes=false
EOF
network {
network_id = hcloud_network.cluster.id
ip = cidrhost(var.subnet_cidr, 10 + count.index)
@@ -44,6 +52,14 @@ resource "hcloud_server" "workers" {
role = "worker"
}
user_data = <<-EOF
#cloud-config
package_update: true
runcmd:
- curl -fsSL https://tailscale.com/install.sh | sh
- tailscale up --authkey '${var.tailscale_auth_key}' --hostname '${var.cluster_name}-worker-${count.index + 1}' --ssh=false --accept-routes=false
EOF
network {
network_id = hcloud_network.cluster.id
ip = cidrhost(var.subnet_cidr, 20 + count.index)