generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
README.yaml
142 lines (114 loc) · 5.28 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-ec2-client-vpn
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Copyrights
copyrights:
- name: "Cloud Posse, LLC"
url: "https://cloudposse.com"
year: "2020"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-ec2-client-vpn
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-ec2-client-vpn.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-client-vpn/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-ec2-client-vpn.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-client-vpn/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: "terraform-aws-components"
description: "Repository collection of aws components."
url: "https://github.com/cloudposse/terraform-aws-components"
- name: "terraform-aws-ssm-tls-self-signed-cert"
description: "This module creates a self-signed certificate and writes it alongside with its key to SSM Parameter Store (or alternatively AWS Secrets Manager). Used to store VPN certificates in ACM."
url: "https://github.com/cloudposse/terraform-aws-ssm-tls-self-signed-cert"
- name: "terraform-provider-awsutils"
description: "Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Hashicorp. Used to export vpn client configuration."
url: "https://github.com/cloudposse/terraform-provider-awsutils"
# List any resources helpful for someone to get started. For example, link to the hashicorp documentation or AWS documentation.
references:
- name: OpenVPN Clients
description: "Any OpenVPN client should be compatible with the AWS Client VPN."
url: https://docs.aws.amazon.com/vpn/latest/clientvpn-user/connect-aws-client-vpn-connect.html
# Short description of this project
description: |-
The `terraform-aws-ec2-client-vpn` project provides for ec2 client vpn infrastructure. AWS Client VPN is a managed client-based VPN service based on OpenVPN that enables you to securely access your AWS resources and resources in your on-premises network. With Client VPN, you can access your resources from any location using [any OpenVPN-based VPN client](https://docs.aws.amazon.com/vpn/latest/clientvpn-user/connect-aws-client-vpn-connect.html).
# Introduction to the project
#introduction: |-
# This is an introduction.
# How to use this module. Should be an easy example to copy and paste.
usage: |-
For a complete example, see [examples/complete](examples/complete).
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest)
(which tests and deploys the example on AWS), see [test](test).
```hcl
module "vpc_target" {
source = "cloudposse/vpc/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
cidr_block = "172.16.0.0/16"
context = module.this.context
}
module "vpc_client" {
source = "cloudposse/vpc/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
cidr_block = "172.31.0.0/16"
context = module.this.context
}
module "subnets" {
source = "cloudposse/dynamic-subnets/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
availability_zones = var.availability_zones
vpc_id = module.vpc_target.vpc_id
igw_id = module.vpc_target.igw_id
cidr_block = module.vpc_target.vpc_cidr_block
nat_gateway_enabled = true
nat_instance_enabled = false
context = module.this.context
}
module "ec2_client_vpn" {
source = "cloudposse/ec2-client-vpn/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
client_cidr = module.vpc_client.vpc_cidr_block
organization_name = var.organization_name
logging_enabled = var.logging_enabled
retention_in_days = var.retention_in_days
associated_subnets = module.subnets.private_subnet_ids
authorization_rules = var.authorization_rules
additional_routes = [
{
destination_cidr_block = "0.0.0.0/0"
description = "Internet Route"
target_vpc_subnet_id = element(module.subnets.private_subnet_ids, 0)
}
]
}
```
# Example usage
examples: |-
Here is an example of using this module:
- [`examples/complete`](https://github.com/cloudposse/terraform-aws-ec2-client-vpn/examples/complete/) - complete example of using this module
# How to get started quickly
#quickstart: |-
# Here's how to get started...
# Other files to include in this README from the project folder
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors: []