Files
TerraHome/terraform/files/cloud_init_global.tpl
MichaelFisher1997 8887a8bb87
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 18s
refactor: move tailscale join fully into cloud-init
Remove guest-agent enrollment workflow, pass TS auth key through Terraform variables/secrets, and run tailscale up with tag:k8s during cloud-init bootstrap alongside SSH key injection.
2026-02-28 13:13:34 +00:00

18 lines
505 B
Smarty

#cloud-config
manage_etc_hosts: true
resolv_conf:
nameservers:
- 8.8.8.8
- 1.1.1.1
preserve_hostname: false
users:
- name: micqdf
ssh_authorized_keys:
- ${SSH_KEY_PUBLIC}
runcmd:
- [ /run/current-system/sw/bin/sh, -lc, "install -d -m 700 /var/lib/tailscale && rm -f /var/lib/tailscale/tailscaled.state" ]
- [ /run/current-system/sw/bin/sh, -lc, "/run/current-system/sw/bin/tailscale up --reset --auth-key='${TS_AUTHKEY}' --hostname='$(hostname)' --advertise-tags='tag:k8s'" ]