Sometimes your development machine is not sufficient for various reasons: For example, you need to build an x86/amd64 Docker image and do not want to

Secure Cloud Workspace with VSCode and Tailscale

submited by
Style Pass
2023-01-24 18:30:05

Sometimes your development machine is not sufficient for various reasons: For example, you need to build an x86/amd64 Docker image and do not want to pay the cost of QEMU, or it is on a limited internet; for these and other reasons, I created a terraform to bootstrap a development machine with a single command.

Another important script is the cloud-config. It is used by Cloud-init to run a set of commands at the very first boot. We will install Docker and its plugins, Tailscale, and asdf.

During the setup, it gets configured the Tailscale and the SSH public keys fetched from GitHub, this allows connecting to the machine with a single command:

This is possible because Tailscale has a feature named magic DNS, which will add the hostname of each machine, by this way, you do not need to remember addresses or open ports, everything works out of the box.

With Cloudflare Tunnel, you can remain occult, and the only traffic is coming up from Cloudflare with Tunnel. A true zero-trust environment.

Leave a Comment