remotely connect to locally running Docker containers using Cloudflare Tunnel powered by Terraform
For this effort, I decided to use Cloudflare Tunnel to connect the AI apps to the internet so that I can have my friends try out the AI apps effortlessly (just to be part of the approved Google email group in Cloudflare Zero Trust zone). Also, I didn't want to pay for cloud server costs when I could just use my own hardware.
When creating your Cloudflare API token, set the following permissions:
Permission type | Permission | Access level |
---|---|---|
Account | Cloudflare Tunnel | Edit |
Account | Access: Apps and Policies | Edit |
Zone | DNS | Edit |
To apply the Cloudflare Tunnel terraform plan, run the following command:
make apply
To see the Cloudflare Tunnel terraform plan, run the following command:
make plan
To destroy the Cloudflare Tunnel terraform plan, run the following command:
make destory