Skip to content

hadenlabs/terraform-aws-openvpn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Latest Release Lint CI Test pre-commit Conventional Commits KeepAChangelog Terraform Version

terraform-aws-openvpn

Terraform module to provision an openvpn instance.

Requirements

This is a list of plugins that need to be installed previously to enjoy all the goodies of this configuration:

Usage

How to use this project

  module "main" {
    source  = "hadenlabs/openvpn/aws"
    version = "0.3.0"

    providers = {
      aws = aws
      template = template
      local = local
    }

    public_key = local.auth_public_key
    private_key = local.auth_private_key
    admin_user = "slovacus"
    storage_path = "~/openvpn"

  }

Full working examples can be found in examples folder.

Examples

common

    module "main" {
      source  = "hadenlabs/openvpn/aws"
      version = "0.4.0"

      providers = {
        aws = aws
        template = template
        local = local
      }

      public_key = local.auth_public_key
      private_key = local.auth_private_key
      admin_user = "slovacus"
      storage_path = "~/openvpn"

    }

Requirements

Name Version
terraform >= 0.12.20, < 2.0
aws >=3.2.0
null >=0.1.0

Providers

Name Version
aws >=3.2.0
null >=0.1.0

Modules

Name Source Version
tags hadenlabs/tags/null >0.1

Resources

Name Type
aws_eip.this resource
aws_instance.this resource
aws_internet_gateway.this resource
aws_key_pair.this resource
aws_route.this resource
aws_security_group.this resource
aws_security_group_rule.egress resource
aws_security_group_rule.ingress resource
aws_subnet.this resource
aws_vpc.this resource
null_resource.openvpn_adduser resource
null_resource.openvpn_download_configurations resource
null_resource.openvpn_install resource
null_resource.provision_core resource
null_resource.provision_openvpn resource
aws_ami.amazon_linux data source

Inputs

Name Description Type Default Required
admin_user admin user string "openvpn" no
environment Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' string null no
instance_type type instance string "t2.micro" no
is_test implement when is execute a test bool false no
name Solution name, e.g. 'app' or 'jenkins' string n/a yes
namespace Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' string null no
private_key private key string n/a yes
public_key public key string n/a yes
rules_ingress list rule for security group
list(object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
}))
[] no
ssh_cidr ssh cidr string "0.0.0.0/0" no
ssh_port port ssh number 22 no
ssh_user user ssh string "ubuntu" no
stage Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' string null no
storage_path storage path keys to local string "~/openvpn" no
subnet_cidr_block subnet cidr block string "10.0.0.0/16" no
tags Additional tags (e.g. map('BusinessUnit','XYZ') map(string) {} no
vpc_cidr_block vpc cidr block string "10.0.0.0/16" no

Outputs

Name Description
instance return instance openvpn
instance_ip return instance openvpn elastic ip public
private_key return filepath privatekey

Help

Got a question?

File a GitHub issue.

Contributing

See Contributing.

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Using the given version number of MAJOR.MINOR.PATCH, we apply the following constructs:

  1. Use the MAJOR version for incompatible changes.
  2. Use the MINOR version when adding functionality in a backwards compatible manner.
  3. Use the PATCH version when introducing backwards compatible bug fixes.

Backwards compatibility in 0.0.z and 0.y.z version

  • In the context of initial development, backwards compatibility in versions 0.0.z is not guaranteed when z is increased. (Initial development)
  • In the context of pre-release, backwards compatibility in versions 0.y.z is not guaranteed when y is increased. (Pre-release)

Copyright

Copyright Β© 2018-2022 Hadenlabs

Trademarks

All other trademarks referenced herein are the property of their respective owners.

License

The code and styles are licensed under the LGPL-3.0 license See project license..

Don't forget to 🌟 Star 🌟 the repo if you like terraform-aws-openvpn

Your feedback is appreciated