Terraform code to deploy a temporary openvpn server in a specified region only accessible from the local public IP.
 
 
 
Go to file
flavien 4cb08101d2
feat(workspace): be able to use this stack by multiple people within same aws account
2023-12-20 15:13:10 +01:00
.gitignore auto region selection, more variables available 2023-10-22 19:18:21 +02:00
Makefile feat(workspace): be able to use this stack by multiple people within same aws account 2023-12-20 15:13:10 +01:00
README.md feat(workspace): be able to use this stack by multiple people within same aws account 2023-12-20 15:13:10 +01:00
aws_regions.txt feat(workspace): be able to use this stack by multiple people within same aws account 2023-12-20 15:13:10 +01:00
backend.tfvars first commit 2023-10-19 20:09:30 +08:00
ec2.tf auto region selection, more variables available 2023-10-22 19:18:21 +02:00
iam.tf first commit 2023-10-19 20:09:30 +08:00
outputs.tf first commit 2023-10-19 20:09:30 +08:00
providers.tf auto region selection, more variables available 2023-10-22 19:18:21 +02:00
s3.tf first commit 2023-10-19 20:09:30 +08:00
user_data.tpl first commit 2023-10-19 20:09:30 +08:00
variables.tf auto region selection, more variables available 2023-10-22 19:18:21 +02:00

README.md

terraform-aws-ovpn-server

Terraform code to deploy a temporary openvpn server in a specified region only accessible from the local public IP.

Getting started

help

make help will print the available makefile rules.

deploy

make deploy WORKSPACE=<...> REGION=<aws-region> INSTANCE_SIZE=<nano/micro/...>
The provider will use the current aws profile, set a profile with sufficient permissions.
WORKSPACE should be set, it will identify your personal terraform state.
⚠️ Use the same workspace for deploy and destroy!
If REGION is not set, a random region is selected from the regions declared in the file aws_regions.txt.
If INSTANCE_SIZE is not set, will use micro by default.
PUBLIC_IP can be set manually but is set by default to your current public ip.
Once a region selected for a deployment it is saved in a .deployed_region file, to not edit manually or deleted or you will lost the tracking a the currently deployed region.

use the vpn

After the deployment you shoud get a aws_vpn.ovpn configuration file, import it to your VPN client (Tunnelblick for example) to connect to the VPN server.