tailscale-policy: filter tailscale_devices list by FQDN prefix instead of hostname lookup #138
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/infrastructure#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
After fixing the
tailscale_devicelookup to usehostnameinstead ofname(coilysiren/infrastructure#137), the two Windows machines still fail import:tailscale status --jsonreveals why:kai-desktop-towerreports OS hostnameKAI-DESKTOP-TOWERkai-windows-laptopreports OS hostnameLAPTOP-5RANHQD2(default Windows naming - never renamed in OS)kais-macbook-proreports OS hostnameKai's MacBook Pro(the Mac initial-setup display name, with apostrophe)kai-serverreportsKAI-SERVERNeither
name(FQDN) norhostname(raw OS hostname) is stable enough to key off indevices.yaml. The only stable identifier mapping cleanly to "what Kai calls this machine" is the MagicDNS short prefix of the FQDN (e.g.kai-server.inkai-server.tail09a41b.ts.net).Change
Drop the per-device
tailscale_devicelookup. Usetailscale_devices(plural, lists every device on the tailnet) once, then compute theshort -> idmap in HCL by filtering onstartswith(d.name, "${short}.").This is provider-side: no SSM cache, no per-device pre-resolve, no committed device IDs. The full list is one API call, cached for the lifetime of the plan/apply.
Filed by Claude.