{"id":16908846,"url":"https://github.com/kakkoyun/terraform-openvpn","last_synced_at":"2025-04-11T15:50:24.631Z","repository":{"id":146686225,"uuid":"123568267","full_name":"kakkoyun/terraform-openvpn","owner":"kakkoyun","description":"You can have your pay as you go personal VPN in minutes! And you can destroy your environment whenever you want!","archived":false,"fork":false,"pushed_at":"2018-03-04T14:42:35.000Z","size":60,"stargazers_count":18,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:52:26.033Z","etag":null,"topics":["docker","hack16","infrastructure-as-code","meltwater","openvpn","openvpn-server","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kakkoyun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-02T10:53:38.000Z","updated_at":"2020-08-05T14:27:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"f64ca93f-b67a-4423-b438-45c3b8312dcf","html_url":"https://github.com/kakkoyun/terraform-openvpn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkoyun%2Fterraform-openvpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkoyun%2Fterraform-openvpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkoyun%2Fterraform-openvpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkoyun%2Fterraform-openvpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kakkoyun","download_url":"https://codeload.github.com/kakkoyun/terraform-openvpn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248434418,"owners_count":21102831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hack16","infrastructure-as-code","meltwater","openvpn","openvpn-server","terraform"],"created_at":"2024-10-13T18:53:14.265Z","updated_at":"2025-04-11T15:50:24.611Z","avatar_url":"https://github.com/kakkoyun.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform OpenVPN\n\nTerraform declarations for Single node OpenVPN infrastructure.\nYou can have your pay as you go personal VPN in minutes! And you can destroy your environment whenever you want!\n\n[![asciicast](https://asciinema.org/a/I7rlhVKvHjf4KuNWYjCzpc0ir.png)](https://asciinema.org/a/I7rlhVKvHjf4KuNWYjCzpc0ir?autoplay=1)\n\n### Prerequisites\n\n`Terraform v0.11.3`\n\nCheck your version.\n\n```\n$ terraform -v\n\n```\n\n### Installing\n\nInstall `Terraform`, you can use [brew](https://brew.sh/) if you're on Mac OS X.\n\n```\n$ brew install terraform\n```\n\n## Usage\n\nMake sure you provided AWS credentials to your environment.\n\nYou can simply export:\n```Bash\nexport AWS_ACCESS_KEY_ID=(your access key id)\nexport AWS_SECRET_ACCESS_KEY=(your secret access key)\n```\n\nOr, you can use something like [awsudo](https://github.com/makethunder/awsudo) if you are using multiple accounts in your system:\n```Bash\n$ awsudo -u personal env | grep AWS\nAWS_ACCESS_KEY_ID='\u003cjadajada\u003e'\nAWS_SECRET_ACCESS_KEY='\u003cblablabla\u003e'\n```\n\nTo provision remote machine, `Terraform` needs to access that machine, for that you have to add your SSH key to your local `ssh-agent`, so `Terraform` can find:\n\n```Bash\n$ ssd-add # Adds default ssh key\n$ ssd-add ~/.ssh/my-jada-jada-key # Adds a specific ssh key\n```\n\nThen plan your changes:\n```Bash\n$ terraform plan\n```\nIf everything is ok, you should see something like:\n\n![after_plan](assets/after_plan.png)\n\nIf everything looks good, you can apply your plan, it will take couple of minutes:\n\n```Bash\n$ terraform apply\n```\n\nIf everything is ok, you should see something like:\n\n![after_apply](assets/after_apply.png)\n\nBooom! You did it!\n\n### Client Setup\n\nUse generated file with an OpenVPN client. In OS X, you can install one with `brew`.\n```Bash\n$ brew install openvpn\n```\n\nThen,\n\n```Bash\n$ sudo openvpn --config awesome-personal-vpn.ovpn\n$ sudo openvpn --config awesome-personal-vpn.ovpn --deaemon # as daemon\n$ sudo -b openvpn --config awesome-personal-vpn.ovpn # run in background\n```\n\nIf you want a GUI client, you can use [Tunnelblick](https://openvpn.net/index.php/access-server/docs/admin-guides/183-how-to-connect-to-access-server-from-a-mac.html) for Mac OS X, with Tunnelblick is installed, just go to your console:\n\n```Bash\n$ open awesome-personal-vpn.ovpn\n```\n\n### Available Parameters\n\nIf you want to configure your VPN, you can pass following parameters.\n\n```Bash\n$ terraform apply \\\n   -var \"aws_region=JADA\" \\\n   -var \"ssh_remote_user=JADA\"\n   -var \"ssh_public_key_path=JADA\" \\\n   -var \"vpn_data=JADA\" \\\n   -var \"vpn_port=1234\" \\\n   -var \"vpn_client_name=JADA\"\n```\n\nYour VPN is ready! Have fun!\n\n## Built With\n\n* [OpenVPN](https://openvpn.net/)\n* [Terraform](https://www.terraform.io/)\n* [Docker](https://www.docker.com/)\n* [Docker OpenVPN Image](https://hub.docker.com/r/kylemanna/openvpn/)\n\nSpecial thanks to [@kylemanna](https://github.com/kylemanna) for [docker-openvpn](https://github.com/kylemanna/docker-openvpn)\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/kakkoyun/terraform-openvpn/tags).\n\n## Authors\n\n* **Kemal Akkoyun** - *Initial work* - [kakkoyun](https://github.com/kakkoyun)\n\nSee also the list of [contributors](https://github.com/kakkoyun/terraform-openvpn/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENCE](LICENCE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakkoyun%2Fterraform-openvpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkakkoyun%2Fterraform-openvpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakkoyun%2Fterraform-openvpn/lists"}