2024-02-09 10:27:12 +08:00
|
|
|
<!-- This readme file is generated with terraform-docs -->
|
2023-07-12 20:37:30 +08:00
|
|
|
# Overview
|
|
|
|
This module performs the following tasks:
|
|
|
|
|
|
|
|
- Create VPC, vpcflow log
|
2024-02-09 10:33:14 +08:00
|
|
|
- Create subnets in multiple AZ
|
2023-07-12 20:37:30 +08:00
|
|
|
- Create IGW, NGW
|
|
|
|
- Create s3 and ddb endpoints which are free
|
2024-02-09 10:31:43 +08:00
|
|
|
|
2024-02-09 10:27:12 +08:00
|
|
|
## Requirements
|
2023-07-12 20:37:30 +08:00
|
|
|
|
2024-02-09 10:35:15 +08:00
|
|
|
| Name | Version |
|
|
|
|
|------|---------|
|
|
|
|
| terraform | >= 1.3.0 |
|
|
|
|
| aws | >= 5.0 |
|
2024-02-09 10:27:12 +08:00
|
|
|
|
|
|
|
## Providers
|
|
|
|
|
|
|
|
| Name | Version |
|
|
|
|
|------|---------|
|
2024-02-09 10:35:15 +08:00
|
|
|
| aws | >= 5.0 |
|
2024-02-09 10:27:12 +08:00
|
|
|
| random | n/a |
|
|
|
|
|
|
|
|
## Modules
|
|
|
|
|
|
|
|
| Name | Source | Version |
|
|
|
|
|------|--------|---------|
|
|
|
|
| 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_flow_log.vpc-flowlog](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_route.private-routes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
|
|
|
|
| [aws_route.public-routes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
|
|
|
|
| [aws_route_table.private-route-table](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
|
|
|
|
| [aws_route_table.public-route-table](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
|
|
|
|
| [aws_route_table_association.private_route_association](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | 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 |
|
|
|
|
|------|-------------|------|---------|:--------:|
|
2024-02-09 10:31:43 +08:00
|
|
|
| create-free-vpc-endpoints | Set true to deploy s3 and dynamodb endpoints, which are free | `bool` | `true` | no |
|
|
|
|
| create-nat-gateway | Set true to deploy NAT gateway | `bool` | `false` | no |
|
|
|
|
| enable-flow-log | Set true to deploy vpc flowlog | `bool` | `true` | no |
|
2024-02-09 10:27:12 +08:00
|
|
|
| log-group-class | Log group class for flowlog cloudwatch log group, which can be STANDARD or INFREQUENT\_ACCESS | `string` | `"STANDARD"` | no |
|
|
|
|
| num\_azs | By default, use 2 AZs for redundancy | `number` | `2` | no |
|
2024-02-09 10:31:43 +08:00
|
|
|
| private-subnet-cidrs | List of private subnet cidrs | `list(string)` | n/a | yes |
|
|
|
|
| public-subnet-cidrs | List of public subnet cidrs | `list(string)` | n/a | yes |
|
2024-02-09 10:27:12 +08:00
|
|
|
| resource-prefix | n/a | `any` | n/a | yes |
|
|
|
|
| secondary\_cidr\_blocks | Additional cidr blocks | `list(string)` | `[]` | no |
|
2024-02-09 10:31:43 +08:00
|
|
|
| vpc-cidr | CIDR of VPC to be created | `string` | n/a | yes |
|
|
|
|
| vpcflowlog-cwl-loggroup-key-arn | CWL log group encryption key arn | `string` | n/a | yes |
|
|
|
|
| vpcflowlog-retain-days | Days to retain flowlog | `number` | `90` | no |
|
2024-02-09 10:27:12 +08:00
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|
|
|
| Name | Description |
|
|
|
|
|------|-------------|
|
|
|
|
| private-route-table-id | n/a |
|
|
|
|
| private-subnet-ids | n/a |
|
|
|
|
| private\_subnets | n/a |
|
|
|
|
| public-route-table-id | n/a |
|
|
|
|
| public-subnet-ids | n/a |
|
|
|
|
| public\_subnets | n/a |
|
|
|
|
| route\_tables\_for\_gateway\_endpoints | n/a |
|
|
|
|
| secondary\_cidr\_blocks | n/a |
|
|
|
|
| vpc-cidr | n/a |
|
|
|
|
| vpc\_id | n/a |
|
|
|
|
|
|
|
|
---
|
|
|
|
## Authorship
|
2024-02-09 10:31:43 +08:00
|
|
|
This module was developed by UPDATE_THIS.
|