Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Terraform modules to create more customized VPCs

License

NotificationsYou must be signed in to change notification settings

cawcaw253/terraform-aws-network

Repository files navigation

Terraform module which creates VPC, Subnet, IG, EIP, NAT Gateway on AWS.

SWUbanner

This module is to help you create vpc resources in AWS.Please refer toExamples for examples of usage.In the following, I will explain the usage and structure in a simple way.

Usage

######## VPC ########module"network" {source="../../"project_name="simple"environment_name="example"vpc_cidr="10.0.0.0/16"region_name="ap-northeast-2"availability_zones=["a","c"]without_nat=falsecreate_nat_per_az=truenat_deploy_module="bastion"public_subnets={    front= ["10.0.0.0/21",/* "10.0.8.0/21",*/"10.0.16.0/21",/* "10.0.24.0/21"*/]# front2  = ["10.0.32.0/21", "10.0.40.0/21", "10.0.48.0/21", "10.0.56.0/21"]    bastion= ["10.0.62.0/26",/* "10.0.62.64/26",*/"10.0.62.128/26",/* "10.0.62.192/26"*/]  }public_subnets_tag={    front= {"kubernetes.io/role/elb"=1    }  }private_subnets={    personal= ["10.0.64.0/20",/* "10.0.80.0/20",*/"10.0.96.0/20",/* "10.0.112.0/20"*/]# rest     = ["10.0.128.0/20", "10.0.144.0/20", "10.0.160.0/20", "10.0.176.0/20"]    database= ["10.0.192.0/21",/* "10.0.200.0/21",*/"10.0.208.0/21",/* "10.0.216.0/21"*/]  }private_subnets_tag={    personal= {"kubernetes.io/role/internal-elb"=1    }  }}

Requirements

NameVersion
aws~> 4.0

Providers

NameVersion
aws~> 4.0

Modules

NameSourceVersion
namercawcaw253/namer/aws1.0.0
regioncawcaw253/region/aws1.0.0

Resources

NameType
aws_eip.natresource
aws_internet_gateway.thisresource
aws_nat_gateway.thisresource
aws_route.internet_gatewayresource
aws_route.nat_gatewayresource
aws_route_table.private_routeresource
aws_route_table.public_routeresource
aws_route_table_association.private_routeresource
aws_route_table_association.public_routeresource
aws_subnet.private_subnetresource
aws_subnet.public_subnetresource
aws_vpc.thisresource

Inputs

NameDescriptionTypeDefaultRequired
availability_zoneslist of availability zones which uselist(string)
[
"a",
"b"
]
no
create_nat_per_azBoolean value for create nat gateway per availability zones. If value is true, create nat gateway per azs, if false create only 1 nat gateway and share itbooltrueno
default_tagsDefault tagsmap(string){}no
environment_nameName of environmentstring"dev"no
nat_deploy_moduleThe name of the module in which to deploy the NAT gateway. Module is key value of public_subnets variable.stringnullno
private_subnetsConfigurations of private subnetmap(list(string))n/ayes
private_subnets_tagSetting tag to specific private subnetmap(map(string)){}no
project_nameName of projectstringn/ayes
public_subnetsConfigurations of public subnetmap(list(string))n/ayes
public_subnets_tagSetting tag to specific public subnetmap(map(string)){}no
region_namename of aws region. if not set value, it automatically set providers current region.stringnullno
vpc_cidrCIDR Block for the VPCstringn/ayes
without_natBoolean value for using nat gateway or notboolfalseno

Outputs

NameDescription
availability_zonesList of Availability Zones where subnets were created
igw_idThe ID of the Internet Gateway
nat_gateway_idsIDs of the NAT Gateways created
private_route_table_idsIDs of the created private route tables
private_subnet_cidrsCIDR list of private subnets
private_subnet_idsID list of private subnets
public_route_table_idsIDs of the created public route tables
public_subnet_cidrsCIDR list of public subnets
public_subnet_idsID list of public subnets
vpc_arnThe ARN of the VPC
vpc_cidr_blockThe primary IPv4 CIDR block of the VPC
vpc_idID of the VPC

About

Terraform modules to create more customized VPCs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp