SourceFuse AWS Reference Architecture (ARC) Terraform module for managing a Client VPN and Site to Site VPN.
For more information about this repository and its usage, please see Terraform AWS ARC CloudFront Usage Guide.
To see a Client VPN example, check out the main.tf file in the example folder.
module "this" {
source = "sourcefuse/arc-vpn/aws"
version = "1.0.0"
vpc_id = data.aws_vpc.this.id
authentication_options_type = "certificate-authentication"
authentication_options_root_certificate_chain_arn = module.self_signed_cert_root.certificate_arn
## access
client_vpn_authorize_all_groups = true
client_vpn_subnet_ids = data.aws_subnets.private.ids
client_vpn_target_network_cidr = data.aws_vpc.this.cidr_block
## self signed certificate
create_self_signed_server_cert = true
self_signed_server_cert_server_common_name = "${var.namespace}-${var.environment}.arc-vpn-example.client"
self_signed_server_cert_organization_name = var.namespace
self_signed_server_cert_ca_pem = module.self_signed_cert_ca.certificate_pem
self_signed_server_cert_private_ca_key_pem = join("", data.aws_ssm_parameter.ca_key[*].value)
## client vpn
client_cidr = cidrsubnet(data.aws_vpc.this.cidr_block, 6, 1)
client_vpn_name = "${var.namespace}-${var.environment}-client-vpn-example"
client_vpn_gateway_name = "${var.namespace}-${var.environment}-vpn-gateway-example"
tags = module.tags.tags
}| Name | Version |
|---|---|
| terraform | >= 1.4, < 2.0.0 |
| aws | >= 4.0, < 6.0 |
No providers.
| Name | Source | Version |
|---|---|---|
| aws_site_to_site_vpn | ./modules/site-to-site-vpn | n/a |
| client_vpn | ./modules/client-vpn | n/a |
No resources.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| client_vpn_config | VPN configuration options including certs and vpn settings | object({ |
{ |
no |
| environment | Environmenr name | string |
n/a | yes |
| name | Name of Client VPN or Site to site VPN | string |
n/a | yes |
| namespace | Namespace name | string |
n/a | yes |
| site_to_site_vpn_config | Configuration for AWS VPN setup combining customer gateway, VPN gateway, and VPN connection configurations. This structure provides a comprehensive approach to defining all necessary parameters for establishing a Site-to-Site VPN. | object({ |
{ |
no |
| tags | Default tags to apply to every applicable resource | map(string) |
n/a | yes |
| vpc_id | The ID of the target network VPC | string |
n/a | yes |
| Name | Description |
|---|---|
| client_vpn_arn | The client vpn ARN |
| client_vpn_id | The client vpn ID |
| customer_gateway_id | Customer Gateway ID |
| server_certificate | Server certificate ARN |
| site_to_site_vpn_id | The site to site vpn ID |
| vpn_gateway_id | The VPN Gateway ID |
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
git commit -m "your commit message #major"By specifying this , it will bump the version and if you don't specify this in your commit message then by default it will consider patch and will bump that accordingly
- Configure pre-commit hooks
pre-commit install
- Tests are available in
testdirectory - Configure the dependencies
cd test/ go mod init github.com/sourcefuse/terraform-aws-refarch-vpn go get github.com/gruntwork-io/terratest/modules/terraform - Now execute the test
go test -timeout 30m
This project is authored by:
- SourceFuse
