mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
27 lines
500 B
HCL
27 lines
500 B
HCL
|
|
variable "tailscale_api_key" {
|
|
type = string
|
|
}
|
|
|
|
provider "tailscale" {
|
|
api_key = var.tailscale_api_key
|
|
tailnet = "inskip.me"
|
|
}
|
|
|
|
resource "tailscale_tailnet_key" "cluster_reusable" {
|
|
reusable = true
|
|
ephemeral = true
|
|
preauthorized = true
|
|
}
|
|
|
|
resource "kubernetes_secret" "tailscale_auth" {
|
|
metadata {
|
|
name = "tailscale-auth"
|
|
namespace = "pihole"
|
|
}
|
|
data = {
|
|
TS_AUTHKEY = tailscale_tailnet_key.cluster_reusable.key
|
|
}
|
|
type = "Opaque"
|
|
}
|
|
|