Post

Removing unused Tailscale access region from Terragrunt configuration

Removing unused Tailscale access region from Terragrunt configuration

The most recent push strips out a Tailscale access‑region input variable from the Terragrunt module that had become dead code. The variable was never referenced in any configuration or test, so its removal reduces the surface area for mis‑configuration and keeps the GitOps pipeline focused on active knobs.

What the commit changed

The refactor removed the tailscale_access_region input from the Terragrunt wrapper that provisions the Tailscale exit node. The variable was defined in the module’s inputs but never passed from the root manifest, and a quick grep across the homelab repo confirmed no other references. The change touches only the wrapper script; the underlying Tailscale provider and remaining inputs are untouched.

Why the input went unused

At some point the Tailscale deployment was restructured to select regions through a different mechanism, leaving this parameter as dead weight. Because Terragrunt evaluates every declared input during plan, an unreferenced variable can cause confusing warnings or accidental overrides. Removing it eliminates that noise and makes the intended region‑selection path explicit.

Verification and CI impact

After the change a terragrunt plan across the affected stacks produced identical resource graphs, and the GitHub Actions CI pipeline that runs plan and apply for the homelab modules now passes without the previous stray‑input warnings. No existing services were re‑created or altered.

A reusable cleanup pattern for other homelab modules

When a platform team notices a declared variable that no root manifest uses, the same approach applies: locate the input definition, verify with a repository‑wide grep that nothing references it, strip the parameter from the module, and run the usual plan‑apply cycle. If the CI gate was previously green with warnings, it often turns stricter after the dead code is gone, giving a cleaner failure mode for future regressions.

This post is licensed under CC BY 4.0 by the author.