Terraform module which creates an OpenVPN EC2 instance in AWS.
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"]
}
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 |
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. |