https://github.com/alesr/vpn
Use Terraform to run a VPN service in Digital Ocean
https://github.com/alesr/vpn
terraform vpn vpn-server
Last synced: 4 months ago
JSON representation
Use Terraform to run a VPN service in Digital Ocean
- Host: GitHub
- URL: https://github.com/alesr/vpn
- Owner: alesr
- Created: 2017-06-29T14:22:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-29T14:47:22.000Z (about 8 years ago)
- Last Synced: 2025-01-22T18:51:40.575Z (5 months ago)
- Topics: terraform, vpn, vpn-server
- Language: HCL
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VPN
Use Terraform for provisioning a Digital Ocean Droplet to work as a VPN server provided by [Tinfoil](https://github.com/tinfoil/openvpn_autoconfig/blob/master/bin/openvpn.sh).
```
------------------------------------------------------------------------
VPN
------------------------------------------------------------------------
start start vpn server
stop stop vpn server
```Note that you must add create Digital Ocean API token and set it on your .bashrc `export DIGITALOCEAN_TOKEN="Your API TOKEN"`
You will also need the API token to retrieve you SSH key ID and past it in the Terraform main file.```
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer [API token here]" "https://api.digitalocean.com/v2/account/keys"
```With the ID key in hand, place it on `main.tf`:
```
resource "digitalocean_droplet" "vpn" {
ssh_keys = [012345]
```