Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-vpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-vpc
Commits
9bc48445
Commit
9bc48445
authored
Nov 11, 2017
by
brian cenker
Committed by
Anton Babenko
Nov 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#22 add vpn gateway feature (#24)
parent
1cdd0002
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
0 deletions
+25
-0
README.md
README.md
+2
-0
main.tf
examples/complete-vpc/main.tf
+1
-0
main.tf
main.tf
+11
-0
outputs.tf
outputs.tf
+6
-0
variables.tf
variables.tf
+5
-0
No files found.
README.md
View file @
9bc48445
...
...
@@ -11,6 +11,7 @@ These types of resources are supported:
*
[
Route table
](
https://www.terraform.io/docs/providers/aws/r/route_table.html
)
*
[
Internet Gateway
](
https://www.terraform.io/docs/providers/aws/r/internet_gateway.html
)
*
[
NAT Gateway
](
https://www.terraform.io/docs/providers/aws/r/nat_gateway.html
)
*
[
VPN Gateway
](
https://www.terraform.io/docs/providers/aws/r/vpn_gateway.html
)
*
[
VPC Endpoint
](
https://www.terraform.io/docs/providers/aws/r/vpc_endpoint.html
)
(
S3
and DynamoDB)
*
[
RDS DB Subnet Group
](
https://www.terraform.io/docs/providers/aws/r/db_subnet_group.html
)
*
[
ElastiCache Subnet Group
](
https://www.terraform.io/docs/providers/aws/r/elasticache_subnet_group.html
)
...
...
@@ -30,6 +31,7 @@ module "vpc" {
public_subnets
=
[
"10.0.101.0/24"
,
"10.0.102.0/24"
,
"10.0.103.0/24"
]
enable_nat_gateway
=
true
enable_vpn_gateway
=
true
tags
=
{
Terraform
=
"true"
...
...
examples/complete-vpc/main.tf
View file @
9bc48445
...
...
@@ -14,6 +14,7 @@ module "vpc" {
create_database_subnet_group
=
false
enable_nat_gateway
=
true
enable_vpn_gateway
=
true
enable_s3_endpoint
=
true
enable_dynamodb_endpoint
=
true
...
...
main.tf
View file @
9bc48445
...
...
@@ -242,3 +242,14 @@ resource "aws_route_table_association" "public" {
subnet_id
=
"
${
element
(
aws_subnet
.
public
.
*
.
id
,
count
.
index
)
}
"
route_table_id
=
"
${
aws_route_table
.
public
.
id
}
"
}
##############
# VPN Gateway
##############
resource
"aws_vpn_gateway"
"this"
{
count
=
"
${
var
.
enable_vpn_gateway
?
1
:
0
}
"
vpc_id
=
"
${
aws_vpc
.
this
.
id
}
"
tags
=
"
${
merge
(
var
.
tags
,
map
(
"Name"
,
format
(
"%s"
,
var
.
name
)))
}
"
}
outputs.tf
View file @
9bc48445
...
...
@@ -112,3 +112,9 @@ output "vpc_endpoint_dynamodb_id" {
description
=
"The ID of VPC endpoint for DynamoDB"
value
=
"
${
aws_vpc_endpoint
.
dynamodb
.
id
}
"
}
# VPN Gateway
output
"vgw_id"
{
description
=
"The ID of the VPN Gateway"
value
=
"
${
aws_vpn_gateway
.
this
.
id
}
"
}
variables.tf
View file @
9bc48445
...
...
@@ -80,6 +80,11 @@ variable "map_public_ip_on_launch" {
default
=
true
}
variable
"enable_vpn_gateway"
{
description
=
"Should be true if you want to create a new VPN Gateway resource and attach it to the VPC"
default
=
false
}
variable
"private_propagating_vgws"
{
description
=
"A list of VGWs the private route table should propagate"
default
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment