Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document how to configure an exit node #279

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/resources/device_subnet_routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment on lines +33 to +34
Copy link
Collaborator

@knyar knyar Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes this example unrealistic, since it does not quite make sense to announce 0/0 alongside more specific subnets.

May I suggest to leave the existing node intact, and add another tailscale_device_subnet_routes block here that would just have two 0/0 routes, providing an example of an exit node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I have adjusted the example accordingly

]
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
9 changes: 9 additions & 0 deletions examples/resources/tailscale_device_subnet_routes/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
Loading