Ever wanted to launch an exit node in a different geography for a short duration to get your work done, and then terminate it? Now you can using Terraform, Tailscale and a cloud provider (Digital Ocean in the configuration)
This is a terraform file that I use to launch a server in digital ocean to act as an exit node, while I work for clients who have geographic restrictions on there site or services. Once the work is done, I destroy the droplet so as to not get charged any more.
Since we are using terraform, you customize the same script to any cloud provider available.
Make sure you have terraform installed.
create the terraform.tfvars.
cp terraform.rfvars.example terraform.rfvarsPlace your token and credentials in the file.
terraform init
terraform applyThats it, your exit note should be online and available for you to pick.
Once you are done with your work, you can destroy the droplet by running the bellow command
terraform destroyIn detail: https://hsps.in/post/setup-on-demand-tailscale-exit-node-using-terraform-and-digital-ocean/