Skip to content

Provisions essential network components of AWS with Terraform

Notifications You must be signed in to change notification settings

uniglot/aws-networking-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Networking Template

This module provisions essential network components of AWS.

The resulting resources include

  • A VPC
  • Public subnets (arbitrary numbers)
  • Private subnets (arbitrary numbers)
  • Route tables
  • An internet gateway, if needed
  • A NAT gateway and the associated Elastic IP, if needed
  • Security groups

Usage Example

# in `main.tf`
module "network" {
source = "github.com/uniglot/aws-networking-template"

project_name = "module-test"
vpc_cidr = "10.0.1.0/24"
pub_sub_cidrs = ["10.0.1.0/25"]
pri_sub_cidrs = ["10.0.1.128/25"]
ssh_allowed_cidrs = ["123.123.12.3/32"]
}

Resources

Name Type
aws_eip.eip resource
aws_internet_gateway.igw resource
aws_nat_gateway.nat resource
aws_route.private resource
aws_route.public resource
aws_route_table.private resource
aws_route_table.public resource
aws_route_table_association.private resource
aws_route_table_association.public resource
aws_security_group.private_access resource
aws_security_group.public_access resource
aws_subnet.private resource
aws_subnet.public resource
aws_vpc.this resource

Inputs

Name Description Type Default Required
pri_sub_cidrs List of CIDR blocks of private subnets. list(string) [] no
project_name Project name that will be used as a name prefix of all resources. string n/a yes
pub_sub_cidrs List of CIDR blocks of public subnets. list(string) [] no
ssh_allowed_cidrs List of CIDR blocks that are allowed for SSH list(string) n/a yes
vpc_cidr The IPv4 CIDR block for the VPC. string n/a yes

Outputs

Name Description
elastic_ip Elastic IP associated with NAT gateway.
igw_id Internet gateway ID
nat_id NAT gateway ID
pri_rt_id Private route table's ID
pri_sub_ids List of private subnet IDs
private_sec_group_id Private security group's ID
pub_rt_id Public route table's ID
pub_sub_ids List of public subnet IDs
public_sec_group_id Public security group's ID
vpc_id VPC ID

About

Provisions essential network components of AWS with Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages