flavien 4cb08101d2 | ||
---|---|---|
.gitignore | ||
Makefile | ||
README.md | ||
aws_regions.txt | ||
backend.tfvars | ||
ec2.tf | ||
iam.tf | ||
outputs.tf | ||
providers.tf | ||
s3.tf | ||
user_data.tpl | ||
variables.tf |
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.