Skip to content

Terraform module to deploy an OpenVPN instance using S3 for configuration storage

License

Notifications You must be signed in to change notification settings

nimbux911/terraform-aws-openvpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS OpenVPN Terraform module

Terraform module which creates an OpenVPN EC2 instance in AWS.

Usage

Terraform required version >= 0.14.8

OpenVPN Service

module "openvpn" {
    source              = "github.com/nimbux911/terraform-aws-openvpn.git"
    stack_name          = "${var.env}-openvpn"
    vpc_id              = "vpc-abcde12345"
    instance_type       = "t3.small"
    subnet_id           = "subnet-abcde12345"
    peered_networks     = ["172.16.0.0/16", "172.17.0.0/16"]
    tags                = local.common_tags
    ssm_parameters_path = "/terraform/ec2-openvpn/"
    ssh_ingress_cidrs   = ["123.22.12.53/32"]
}

Inputs

Name Description Type Default Required
compose_cidr CIDR for default compose network. string "192.168.127.1/24" no
docker_cidr CIDR for default docker network. string "192.168.125.1/24" no
instance_type OpenVPN EC2 instance type. string "t3a.micro" no
peered_networks CIDRs blocks which OpenVPN will be able to route the traffic to/from. list(string) [] no
ssh_ingress_cidrs CIDR blocks to allow ssh access to the OpenVPN instance. list(string) [] no
ssm_parameters_path Path prefix for ssm parameters. string "" no
stack_name Name for the stack resources. string "openvpn" no
subnet_id Public subnet id to host the OpenVPN instance. string yes
tags Tags to add to the stack resources. map {} no
ubuntu_ami_id Custom Ubuntu AMI id for the OpenVPN instance. string "" no
volume_path Path to mount the data fs. string "/openvpn/" no
vpc_id VPC id where the OpenVPN will be hosted. string yes

Outputs

Name Description
autoscaling_group_id The ID of the autoscaling group.
data_volume_id The ID of the data EBS volume.
eip_public_ip The public address of the eip.
iam_role_arn The instance role ARN.
security_group_id The ID of the security group.

About

Terraform module to deploy an OpenVPN instance using S3 for configuration storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •