ngadde / terraform-aws-vpc

Terraform module for AWS VPC

Home Page:https://registry.terraform.io/modules/shamimice03/vpc/aws/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create AWS VPC using Terraform

Usage

module "vpc" {

    source = "shamimice03/vpc/aws"

    create = true

    vpc_name = "prod-vpc"
    cidr     = "192.168.0.0/16"

    azs                 = ["ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"]
    public_subnet_cidr  = ["192.168.0.0/20", "192.168.16.0/20", "192.168.32.0/20"]
    private_subnet_cidr = ["192.168.48.0/20", "192.168.64.0/20", "192.168.80.0/20"]
    db_subnet_cidr      = ["192.168.96.0/20", "192.168.112.0/20", "192.168.128.0/20"]
    intra_subnet_cidr   = ["192.168.144.0/20", "192.168.160.0/20", "192.168.176.0/20"]

    enable_dns_hostnames      = true
    enable_dns_support        = true
    enable_single_nat_gateway = false

    tags = {
      "Team" = "platform-team"
      "Env"  = "prod"
    }
}

Requirements

Name Version
terraform >= 1.0.0
aws >= 5.0.0

Providers

Name Version
aws 5.16.2

Modules

No modules.

Resources

Name Type
aws_eip.single_eip resource
aws_internet_gateway.igw resource
aws_nat_gateway.single_nat_gateway resource
aws_route.private_route_table_route resource
aws_route.public_route_table_route resource
aws_route_table.db_route_table resource
aws_route_table.intra_route_table resource
aws_route_table.private_route_table resource
aws_route_table.public_route_table resource
aws_route_table_association.db_route_table_association resource
aws_route_table_association.intra_route_table_association resource
aws_route_table_association.private_route_table_association resource
aws_route_table_association.public_route_table_association resource
aws_subnet.db_subnet resource
aws_subnet.intra_subnet resource
aws_subnet.private resource
aws_subnet.public resource
aws_vpc.this_vpc resource

Inputs

Name Description Type Default Required
azs List of AZs list(any) [] no
cidr CIDR Block of the VPC string "" no
create Controls if VPC should be created or not bool true no
db_subnet_cidr Mapping AZ and DB subnets list(any) [] no
enable_dns_hostnames Should be true to enable DNS hostnames in the VPC bool false no
enable_dns_support Should be true to enable DNS support in the VPC bool true no
enable_single_nat_gateway Should be true to create NAT gateway for private subnets bool false no
intra_subnet_cidr Mapping AZ and Intra subnets list(any) [] no
private_subnet_cidr Mapping AZ and Private subnets list(any) [] no
public_subnet_cidr Mapping AZ and Public subnets list(any) [] no
tags A map of tags to add to all resources map(any) {} no
vpc_name Name of the vpc string "" no

Outputs

Name Description
db_subnet_id DB Subnet ID's
igw_id Internet Gateway ID's
intra_subnet_id DB Subnet ID's
private_subnet_id Private Subnet ID's
public_subnet_id Public Subnet ID's
vpc_cidr_block The CIDR block of the VPC
vpc_id ID of the VPC

Others:

About

Terraform module for AWS VPC

https://registry.terraform.io/modules/shamimice03/vpc/aws/latest

License:Apache License 2.0


Languages

Language:HCL 100.0%