forked from terraform-community-modules/tf_aws_openvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to terraform-community-modules
- Loading branch information
Quentin Rousseau
committed
May 23, 2017
1 parent
2928d8f
commit c4d15b2
Showing
5 changed files
with
87 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
Author:: Quentin Rousseau (<[email protected]>) | ||
|
||
Copyright 2017 Quentin Rousseau | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
@@ -8,4 +12,3 @@ Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## Terraform OpenVPN module for AWS | ||
# tf_aws_openvpn | ||
|
||
### This module is creating the following resources: | ||
Terraform module which creates OpenVPN on AWS | ||
|
||
## This module is creating the following resources: | ||
|
||
1. Two Route53 Records | ||
a. vpn-web.domain.com | ||
|
@@ -9,7 +11,7 @@ | |
3. One EC2 Security Group | ||
4. One EC2 Instance | ||
|
||
### Architecture | ||
## Architecture | ||
|
||
```plain | ||
|
@@ -32,25 +34,37 @@ Internet --> | DNS | --> | SG | --> | EC2 | | |
vpn.domain.com --> TCP:1194 --> TCP:1194 OK | ||
``` | ||
|
||
### Usage | ||
## Usage | ||
|
||
```hcl | ||
module "openvpn" { | ||
source = "github.com/kwent/terraform-openvpn-aws" | ||
source = "github.com/terraform-community-modules/tf_aws_openvpn" | ||
name = "openVPN" | ||
# VPC Inputs | ||
vpc_id = "${var.vpc_id}" | ||
vpc_cidr = "${var.vpc_cidr}" | ||
public_subnet_ids = "${var.public_subnet_ids}" | ||
cert_arn = "${var.cert_arn}" | ||
# EC2 Inputs | ||
key_name = "${var.key_name}" | ||
private_key = "${var.private_key}" | ||
ami = "${var.ami}" | ||
instance_type = "${var.instance_type}" | ||
# ELB Inputs | ||
cert_arn = "${var.cert_arn}" | ||
# DNS Inputs | ||
domain_name = "${var.public_domain_name}" | ||
route_zone_id = "${var.route_zone_id}" | ||
# OpenVPN Inputs | ||
openvpn_user = "${var.openvpn_user}" | ||
openvpn_admin_user = "${var.openvpn_admin_user}" | ||
openvpn_admin_user = "${var.openvpn_admin_user}" # Note: Don't choose "admin" username. Looks like it's already reserved. | ||
openvpn_admin_pw = "${var.openvpn_admin_pw}" | ||
vpn_cidr = "${var.vpn_cidr}" | ||
sub_domain = "${var.public_domain_name}" | ||
route_zone_id = "${var.route_zone_id}" | ||
} | ||
``` | ||
|
||
## Authors | ||
|
||
Created and maintained by [Quentin Rousseau](https://github.com/kwent) ([email protected]). | ||
|
||
## License | ||
|
||
Apache 2 Licensed. See LICENSE for full details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
output "private_ip" { value = "${aws_instance.openvpn.private_ip}" } | ||
output "public_ip" { value = "${aws_instance.openvpn.public_ip}" } | ||
output "public_web_fqdn" { value = "${aws_route53_record.openvpn-web.fqdn}" } | ||
output "public_fqdn" { value = "${aws_route53_record.openvpn.fqdn}" } | ||
output "private_ip" { | ||
value = "${aws_instance.openvpn.private_ip}" | ||
} | ||
|
||
output "public_ip" { | ||
value = "${aws_instance.openvpn.public_ip}" | ||
} | ||
|
||
output "public_web_fqdn" { | ||
value = "${aws_route53_record.openvpn-web.fqdn}" | ||
} | ||
|
||
output "public_fqdn" { | ||
value = "${aws_route53_record.openvpn.fqdn}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
variable "name" { default = "openvpn" } | ||
variable "vpc_id" { } | ||
variable "vpc_cidr" { } | ||
variable "public_subnet_ids" { type = "list" } | ||
variable "cert_arn" { } | ||
variable "key_name" { } | ||
variable "private_key" { } | ||
variable "ami" { } | ||
variable "instance_type" { } | ||
variable "openvpn_user" { } | ||
variable "openvpn_admin_user" { } | ||
variable "openvpn_admin_pw" { } | ||
variable "vpn_cidr" { } | ||
variable "sub_domain" { } | ||
variable "route_zone_id" { } | ||
variable "name" { | ||
default = "openvpn" | ||
} | ||
|
||
variable "vpc_id" {} | ||
variable "vpc_cidr" {} | ||
|
||
variable "public_subnet_ids" { | ||
type = "list" | ||
} | ||
|
||
variable "cert_arn" {} | ||
variable "key_name" {} | ||
variable "private_key" {} | ||
variable "ami" {} | ||
variable "instance_type" {} | ||
variable "openvpn_user" {} | ||
variable "openvpn_admin_user" {} | ||
variable "openvpn_admin_pw" {} | ||
variable "vpn_cidr" {} | ||
variable "domain_name" {} | ||
variable "route_zone_id" {} |