Skip to content

andcip/aws-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Networking

AWS Networking general module


This module deploy a complete VPC, with Endpoints, Routing tables and a Bastion Host based on input variables

Example of invocation

## If subnet are not specified, 4 subnets ( 2 public and 2 private ) are created automatically from the vpc cidr.
cidr_block = "10.0.0.0/24"

project_name = "Test"

vpc_endpoints = ["s3", "ecr.dkr", "ecr.api"]

bastion = {
  enabled : true,
  certificate_name : "test-certificate",
  certificate_key : "${get_terragrunt_dir()}/../investor.pub"
}


Variable Documentation

Requirements

No requirements.

Providers

Name Version
aws 4.0.0

Modules

Name Source Version
bastion ./bastion n/a
vpce ./vpce n/a

Resources

Name Type
aws_cloudwatch_log_group.vpc_flow_log_group resource
aws_ec2_transit_gateway_vpc_attachment.tg_vpc_attachment resource
aws_eip.nat resource
aws_flow_log.vpc_flow_log resource
aws_iam_role.flow_log_role resource
aws_iam_role_policy.flow_log_policy resource
aws_internet_gateway.igw resource
aws_nat_gateway.ng resource
aws_route_table.private resource
aws_route_table.public resource
aws_route_table_association.private resource
aws_route_table_association.public resource
aws_ssm_parameter.private_subnet_ids resource
aws_ssm_parameter.vpc resource
aws_subnet.private resource
aws_subnet.public resource
aws_vpc.main resource
aws_availability_zones.az data source
aws_ec2_transit_gateway.transit data source

Inputs

Name Description Type Default Required
bastion Choose if enable bastion host, with the given ssh certificate
object({
enabled : bool,
certificate_name : string,
certificate_key : string
})
{
"certificate_key": null,
"certificate_name": null,
"enabled": false
}
no
cidr_block The CIDR block to use fot the VPC. string n/a yes
project_name The project name, must not be empty string n/a yes
subnets Utility object to specify private and public subnets. You can choose the number and the cidr of everyone. Default goes to 2 private and 2 public and the relative cidrs are calculated based on vpc
object({
private : object({
count : number,
cidr : list(string)
}),
public : object({
count : number,
cidr : list(string)
})
})
{
"private": {
"cidr": [],
"count": 2
},
"public": {
"cidr": [],
"count": 2
}
}
no
tg_routes List of subnets to route to the transit gateway. list(string) [] no
vpc_endpoints List of vpc endpoint to enable. list(string) [] no
vpc_flow_log_enabled Enable the VPC flow logs, default disabled bool false no

Outputs

Name Description
private_subnets n/a
public_subnets n/a
transit_routes n/a
vpc n/a

About

Network Terraform module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages