From 9d3b66b3a30854ab6dfd4e8f5c6627409934f313 Mon Sep 17 00:00:00 2001 From: xpk Date: Fri, 9 Feb 2024 10:31:43 +0800 Subject: [PATCH] UPD: updated variables and readme file --- .../networking/vpc-subnet-manual/README.md | 20 +++++++------- .../networking/vpc-subnet-manual/variables.tf | 26 ++++++++++++++----- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/modules/networking/vpc-subnet-manual/README.md b/modules/networking/vpc-subnet-manual/README.md index 84ca6b7..d8ac6f8 100644 --- a/modules/networking/vpc-subnet-manual/README.md +++ b/modules/networking/vpc-subnet-manual/README.md @@ -6,7 +6,7 @@ This module performs the following tasks: - Create subnets in every AZ - Create IGW, NGW - Create s3 and ddb endpoints which are free -- + ## Requirements No requirements. @@ -55,18 +55,18 @@ No requirements. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| create-free-vpc-endpoints | variable "private-subnet-cidrs" {} variable "public-subnet-cidrs" {} | `bool` | `true` | no | -| create-nat-gateway | n/a | `bool` | `false` | no | -| enable-flow-log | n/a | `bool` | `true` | no | +| 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 | | 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 | -| private-subnet-cidrs | n/a | `list(any)` | n/a | yes | -| public-subnet-cidrs | n/a | `list(any)` | n/a | yes | +| 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 | | resource-prefix | n/a | `any` | n/a | yes | | secondary\_cidr\_blocks | Additional cidr blocks | `list(string)` | `[]` | no | -| vpc-cidr | VPC variables | `any` | n/a | yes | -| vpcflowlog-cwl-loggroup-key-arn | n/a | `any` | n/a | yes | -| vpcflowlog-retain-days | n/a | `number` | `90` | no | +| 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 | ## Outputs @@ -85,4 +85,4 @@ No requirements. --- ## Authorship -This module was developed by xpk. \ No newline at end of file +This module was developed by UPDATE_THIS. \ No newline at end of file diff --git a/modules/networking/vpc-subnet-manual/variables.tf b/modules/networking/vpc-subnet-manual/variables.tf index c70dde0..47e2827 100644 --- a/modules/networking/vpc-subnet-manual/variables.tf +++ b/modules/networking/vpc-subnet-manual/variables.tf @@ -1,35 +1,49 @@ variable "resource-prefix" {} # VPC variables -variable "vpc-cidr" {} +variable "vpc-cidr" { + type = string + description = "CIDR of VPC to be created" +} variable "private-subnet-cidrs" { - type = list(any) + description = "List of private subnet cidrs" + type = list(string) } variable "public-subnet-cidrs" { - type = list(any) + description = "List of public subnet cidrs" + type = list(string) } variable "create-nat-gateway" { + description = "Set true to deploy NAT gateway" type = bool default = false } + variable "enable-flow-log" { + description = "Set true to deploy vpc flowlog" type = bool default = true } + variable "vpcflowlog-retain-days" { + description = "Days to retain flowlog" type = number default = 90 } -variable "vpcflowlog-cwl-loggroup-key-arn" {} -# variable "private-subnet-cidrs" {} -# variable "public-subnet-cidrs" {} +variable "vpcflowlog-cwl-loggroup-key-arn" { + description = "CWL log group encryption key arn" + type = string +} + variable "create-free-vpc-endpoints" { + description = "Set true to deploy s3 and dynamodb endpoints, which are free" type = bool default = true } + variable "secondary_cidr_blocks" { type = list(string) description = "Additional cidr blocks"