From 38e917601a4004eb2da6c0e489143b4010d47bcc Mon Sep 17 00:00:00 2001 From: Manuel Hutter Date: Fri, 1 Sep 2023 16:08:32 +0200 Subject: [PATCH] docs: Document how to configure an exit node Even though it makes sense, it took quite a bit of figuring-out to do, so hopefully this saves someone else some time. Signed-off-by: Manuel Hutter --- docs/resources/device_subnet_routes.md | 9 +++++++++ .../resources/tailscale_device_subnet_routes/resource.tf | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/resources/device_subnet_routes.md b/docs/resources/device_subnet_routes.md index 4e43ed7a..c5fa150d 100644 --- a/docs/resources/device_subnet_routes.md +++ b/docs/resources/device_subnet_routes.md @@ -25,6 +25,15 @@ resource "tailscale_device_subnet_routes" "sample_routes" { "2.0.0.0/24" ] } + +resource "tailscale_device_subnet_routes" "sample_exit_node" { + device_id = data.tailscale_device.sample_device.id + routes = [ + # Configure as an exit node + "0.0.0.0/0", + "::/0" + ] +} ``` diff --git a/examples/resources/tailscale_device_subnet_routes/resource.tf b/examples/resources/tailscale_device_subnet_routes/resource.tf index 6276cf53..cc3352de 100644 --- a/examples/resources/tailscale_device_subnet_routes/resource.tf +++ b/examples/resources/tailscale_device_subnet_routes/resource.tf @@ -10,3 +10,12 @@ resource "tailscale_device_subnet_routes" "sample_routes" { "2.0.0.0/24" ] } + +resource "tailscale_device_subnet_routes" "sample_exit_node" { + device_id = data.tailscale_device.sample_device.id + routes = [ + # Configure as an exit node + "0.0.0.0/0", + "::/0" + ] +}