This Terraform code creates a deployment on Digital Ocean as described on this tutorial:
How to Configure a Droplet as a VPC Gateway
- In your Digital Ocean account you must add ssh key must be named
gateway
- Create Terraform cloud account https://www.terraform.io/cloud
- Get your Digital Ocean token from: https://cloud.digitalocean.com/account/api/tokens make sure that you are on the correct team. Token must have read / write access. Token is shown for single time only, please save it.
- Connect this Repo to Terraform cloud folowing this tutorial https://learn.hashicorp.com/tutorials/terraform/cloud-workspace-create?in=terraform/cloud-get-started
- on the last step of the previous tutorial set the variables as follows:
do_token
: YOUR_DIGITALOCEAN_TOKEN
do_count
: Number of back droplets
- You will be able to access back droplets only throug the Gateway
- Back droplets will communicate to the internet using gateway ip