Skip to content

chasezheng/terraform-google-openvpn

 
 

Repository files navigation

Terraform OpenVPN GCP

A terraform module to setup OpenVPN on GCP

Usage

module "openvpn" {
  source     = "../modules/terraform-openvpn-gcp"
  region     = var.region
  project_id = var.project_id
  network    = module.vpc.network
  subnetwork = module.vpc.public_subnetwork
  hostname   = "openvpn"
  output_dir = "${path.module}/openvpn"
  users      = ["bob", "alice"]
}

Doc generation

Code formatting and documentation for variables and outputs is generated using pre-commit-terraform hooks which uses terraform-docs.

And install terraform-docs with

go get github.com/segmentio/terraform-docs

or

brew install terraform-docs.

Contributing

Report issues/questions/feature requests on in the issues section.

Full contributing guidelines are covered here.

Requirements

No requirements.

Providers

Name Version
google n/a
local n/a
null n/a
random n/a
tls n/a

Inputs

Name Description Type Default Required
disk_size_gb n/a string "30" no
hostname Hostname of instances string "openvpn" no
image_family n/a string "ubuntu-2004-lts" no
labels Labels, provided as a map map {} no
metadata Metadata, provided as a map map {} no
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. any null 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
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({
email = string,
scopes = set(string)
})
{
"email": null,
"scopes": []
}
no
source_image_project n/a string "ubuntu-os-cloud" 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

Outputs

Name Description
users Created Users

About

A terraform module to setup OpenVPN on GCP

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 69.7%
  • Shell 30.3%