| <a name="input_vpcs"></a> [vpcs](#input\_vpcs) | A map defining VPCs with security groups and subnets.<br><br>Following properties are available:<br>- `name`: VPC name<br>- `cidr`: CIDR for VPC<br>- `nacls`: map of network ACLs<br>- `security_groups`: map of security groups<br>- `subnets`: map of subnets with properties:<br> - `az`: availability zone<br> - `subnet_group`: identity of the same purpose subnets group such as management<br> - `nacl`: key of NACL (can be null)<br>- `routes`: map of routes with properties:<br> - `vpc` - key of VPC<br> - `subnet_group` - key of subnet\_group<br> - `next_hop_key` - must match keys use to create TGW attachment, IGW, GWLB endpoint or other resources<br> - `next_hop_type` - internet\_gateway, nat\_gateway, transit\_gateway\_attachment or gwlbe\_endpoint<br><br>Example:<pre>vpcs = {<br> example_vpc = {<br> name = "example-spoke-vpc"<br> cidr = "10.104.0.0/16"<br> nacls = {<br> trusted_path_monitoring = {<br> name = "trusted-path-monitoring"<br> rules = {<br> allow_inbound = {<br> rule_number = 300<br> egress = false<br> protocol = "-1"<br> rule_action = "allow"<br> cidr_block = "0.0.0.0/0"<br> from_port = null<br> to_port = null<br> }<br> }<br> }<br> }<br> security_groups = {<br> example_vm = {<br> name = "example_vm"<br> rules = {<br> all_outbound = {<br> description = "Permit All traffic outbound"<br> type = "egress", from_port = "0", to_port = "0", protocol = "-1"<br> cidr_blocks = ["0.0.0.0/0"]<br> }<br> }<br> }<br> }<br> subnets = {<br> "10.104.0.0/24" = { az = "eu-central-1a", subnet_group = "vm", nacl = null }<br> "10.104.128.0/24" = { az = "eu-central-1b", subnet_group = "vm", nacl = null }<br> }<br> routes = {<br> vm_default = {<br> vpc = "app1_vpc"<br> subnet_group = "app1_vm"<br> to_cidr = "0.0.0.0/0"<br> next_hop_key = "app1"<br> next_hop_type = "transit_gateway_attachment"<br> }<br> }<br> }<br>}</pre> | <pre>map(object({<br> name = string<br> cidr = string<br> nacls = map(object({<br> name = string<br> rules = map(object({<br> rule_number = number<br> egress = bool<br> protocol = string<br> rule_action = string<br> cidr_block = string<br> from_port = string<br> to_port = string<br> }))<br> }))<br> security_groups = any<br> subnets = map(object({<br> az = string<br> subnet_group = string<br> nacl = string<br> }))<br> routes = map(object({<br> vpc = string<br> subnet_group = string<br> to_cidr = string<br> next_hop_key = string<br> next_hop_type = string<br> }))<br> }))</pre> | `{}` | no |
0 commit comments