mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
Gabriel Arazas
560230645f
Not automated per-se since we are dealing with not-NixOS-but-only-after-it-is-installed Hetzner server. I really have to figure that part out.
23 lines
551 B
HCL
23 lines
551 B
HCL
data "tailscale_device" "plover" {
|
|
hostname = "plover"
|
|
}
|
|
|
|
resource "tailscale_device_authorization" "plover_authorization" {
|
|
device_id = data.tailscale_device.plover.id
|
|
authorized = true
|
|
depends_on = [ hcloud_server.plover ]
|
|
}
|
|
|
|
resource "tailscale_tailnet_key" "plover" {
|
|
reusable = false
|
|
ephemeral = false
|
|
preauthorized = true
|
|
recreate_if_invalid = "always"
|
|
description = "Plover"
|
|
}
|
|
|
|
resource "local_file" "tailscale_auth_key" {
|
|
content = tailscale_tailnet_key.plover.key
|
|
filename = "${path.module}/plover-tailscale-auth-key"
|
|
}
|