mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
hosts/plover: add Tailscale tag and network file for future references
This commit is contained in:
parent
560230645f
commit
506e64d44c
@ -26,3 +26,15 @@ resource "hcloud_ssh_key" "plover" {
|
||||
name = "plover.foodogsquared.one"
|
||||
public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGo3tfNQjWZ5pxlqREfBgQJxdNzGHKJIy5hDS9Z+Hpth plover.foodogsquared.one"
|
||||
}
|
||||
|
||||
resource "local_file" "network_file" {
|
||||
content = jsonencode({
|
||||
interfaces = {
|
||||
wan = {
|
||||
ipv4 = hcloud_server.plover.ipv4_address
|
||||
ipv6 = hcloud_server.plover.ipv6_address
|
||||
}
|
||||
}
|
||||
})
|
||||
filename = "${path.module}/network.json"
|
||||
}
|
||||
|
@ -16,6 +16,11 @@ resource "tailscale_tailnet_key" "plover" {
|
||||
description = "Plover"
|
||||
}
|
||||
|
||||
resource "tailscale_device_tags" "hcloud_plover" {
|
||||
device_id = data.tailscale_device.plover.id
|
||||
tags = [ "tag:server" ]
|
||||
}
|
||||
|
||||
resource "local_file" "tailscale_auth_key" {
|
||||
content = tailscale_tailnet_key.plover.key
|
||||
filename = "${path.module}/plover-tailscale-auth-key"
|
||||
|
Loading…
Reference in New Issue
Block a user