This module performs the following tasks: - Create VPC, vpcflow log - Create subnets in every AZ - Create IGW, NGW - Create s3 and ddb endpoints which are free ## Requirements | Name | Version | |------|---------| | terraform | >= 1.3.0 | | aws | >= 5.0 | ## Providers | Name | Version | |------|---------| | aws | >= 5.0 | | random | n/a | ## Modules | Name | Source | Version | |------|--------|---------| | private-route | ./modules/RouteTables | n/a | | private-route-multiaz | ./modules/RouteTables | n/a | | vpc-ep | ../vpc-endpoints | n/a | ## Resources | Name | Type | |------|------| | [aws_cloudwatch_log_group.vpcflowlog-loggroup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource | | [aws_default_security_group.default-sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_security_group) | resource | | [aws_eip.ngw-eip](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource | | [aws_eip.ngw-eip-multiaz](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource | | [aws_flow_log.vpc-flowlog](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/flow_log) | resource | | [aws_flow_log.vpc-flowlog-s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/flow_log) | resource | | [aws_iam_role.vpcflowlog-role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role_policy.vpcflowlog-role-policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource | | [aws_internet_gateway.igw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway) | resource | | [aws_nat_gateway.ngw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/nat_gateway) | resource | | [aws_nat_gateway.ngw-multiaz](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/nat_gateway) | resource | | [aws_route.public-routes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource | | [aws_route_table.public-route-table](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource | | [aws_route_table_association.public_route_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | | [aws_subnet.private-subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | | [aws_subnet.public-subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | | [aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource | | [aws_vpc_ipv4_cidr_block_association.additional_cidr](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_ipv4_cidr_block_association) | resource | | [random_id.rid](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | | [aws_availability_zones.available-az](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones) | data source | | [aws_caller_identity.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | | [aws_default_tags.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/default_tags) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | create-free-vpc-endpoints | Whether to deploy free VPC endpoints (s3 and dynamodb) | `bool` | `true` | no | | create-nat-gateway | Deploy NAT gateway for private subnets | `bool` | `false` | no | | enable-flow-log | Whether to enable VPC flowlog | `bool` | `true` | no | | flow-log-bucket-arn | Arn of S3 bucket to be used for flow logging | `string` | `null` | no | | flow-log-destination | Destination of flowlog. Valid destinations are s3 or cwlog | `string` | `null` | no | | multiaz-nat-gateway | Whether to deploy 1 NAT gateway for each AZ | `bool` | `false` | no | | private-subnet-cidrs | Private subnet CIDRs | `list(string)` | `[]` | no | | public-subnet-cidrs | Public subnet CIDRs | `list(string)` | `[]` | no | | resource-prefix | Prefix of resource | `string` | n/a | yes | | secondary\_cidr\_blocks | Additional cidr blocks | `list(string)` | `[]` | no | | vpc-cidr | VPC primary CIDR | `string` | n/a | yes | | vpcflowlog-cwl-loggroup-key-arn | KMS key arn for cwlog encryption | `string` | n/a | yes | | vpcflowlog-retain-days | Log retention period for CWlogs | `number` | `90` | no | ## Outputs | Name | Description | |------|-------------| | private-subnet-details | Details of private subnets | | private-subnet-ids | List of private subnet id | | private\_subnets | Private subnet cidrs | | public-route-table-id | Public route table id | | public-subnet-details | Details of public subnets | | public-subnet-ids | List of public subnet id | | public\_subnets | Public subnet cidrs | | secondary\_cidr\_blocks | Secondary CIDR block | | vpc-cidr | VPC primary cidr | | vpc\_id | VPC id | --- ## Authorship This module was developed by xpk.