A terraform module to setup OpenVPN on GCP.
module "openvpn" {
source = "DeimosCloud/openvpn/google"
version = "~>2.1.1"
name = var.name
region = var.region
project_id = var.project_id
network = module.vpc.network
subnetwork = module.vpc.public_subnetwork
output_dir = "${path.module}/openvpn"
users = ["bob", "alice"]
}
Report issues/questions/feature requests on in the issues section.
Full contributing guidelines are covered here.
Name | Version |
---|---|
terraform | >= 0.14 |
Name | Version |
---|---|
4.14.0 | |
local | 2.2.2 |
null | 3.1.1 |
random | 3.1.2 |
tls | 3.1.0 |
No modules.
Name | Type |
---|---|
google_compute_address.default | resource |
google_compute_disk.this | resource |
google_compute_firewall.allow-external-ssh | resource |
google_compute_firewall.allow-openvpn-udp-port | resource |
google_compute_instance_from_template.this | resource |
google_compute_instance_template.tpl | resource |
local_sensitive_file.private_key | resource |
null_resource.openvpn_download_configurations | resource |
null_resource.openvpn_update_users_script | resource |
random_id.password | resource |
random_id.this | resource |
tls_private_key.ssh-key | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
auto_delete_disk | Whether or not the boot disk should be auto-deleted | bool |
false |
no |
disk_size_gb | n/a | string |
"30" |
no |
disk_type | (Optional) The GCE disk type. Can be either pd-ssd, local-ssd, pd-balanced or pd-standard | string |
"pd-standard" |
no |
dns_servers | The DNS servers to be configured | list(string) |
[ |
no |
image_family | n/a | string |
"ubuntu-2004-lts" |
no |
install_script_url | The commit sha we are using in order to determine which version of the install file to use: https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh | string |
"https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh" |
no |
labels | Labels, provided as a map | map |
{} |
no |
machine_type | Machine type to create, e.g. n1-standard-1 | string |
"n1-standard-1" |
no |
metadata | Metadata, provided as a map | map |
{} |
no |
name | The name to use when generating resources | string |
n/a | yes |
network | The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks. | string |
"default" |
no |
network_tier | Network network_tier | string |
"STANDARD" |
no |
output_dir | Folder to store all user openvpn details | string |
"openvpn" |
no |
project_id | The GCP Project ID | any |
null |
no |
region | The GCP Project Region | any |
null |
no |
remote_user | The user to operate as on the VM. SSH Key is generated for this user | string |
"ubuntu" |
no |
route_only_private_ips | Routes only private IPs through the VPN (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) | bool |
false |
no |
service_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template.html#service_account. | object({ |
{ |
no |
subnetwork | The name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided. | any |
null |
no |
tags | network tags to attach to the instance | list |
[] |
no |
users | list of user to create | list(string) |
[] |
no |
zone | The GCP Zone to deploy VPN Compute instance to | any |
n/a | yes |
Name | Description |
---|---|
users | Created Users |