From ddb9dc2ff20800b2fe63663f712c50a0eb080c68 Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:11:53 +0530 Subject: [PATCH 1/7] Add files via upload --- variables.tf | 116 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 26 deletions(-) diff --git a/variables.tf b/variables.tf index ca9a7a5..eebb9c5 100644 --- a/variables.tf +++ b/variables.tf @@ -1,3 +1,25 @@ +variable "additional_tags" { + description = "Additional tags to be applied to AWS resources" + type = map(string) + default = { + Owner = "organization_name" + Expires = "Never" + Department = "Engineering" + } +} + +variable "aws_region" { + description = "Name of the AWS region where VPC is to be created." + default = "" + type = string +} + +variable "aws_account_id" { + description = "Account ID of the AWS Account." + default = "1234567890" + type = string +} + variable "environment" { description = "Specify the environment indentifier for the VPC" type = string @@ -17,31 +39,31 @@ variable "vpc_cidr" { type = string } -variable "availability_zones" { - description = "Number of Availability Zone to be used by VPC Subnets" +variable "vpc_availability_zones" { + description = "Number of Availability Zone to be used by VPC Subnets." default = [] type = list(any) } -variable "public_subnet_enabled" { +variable "vpc_public_subnet_enabled" { description = "Set true to enable public subnets" default = false type = bool } -variable "public_subnet_cidrs" { +variable "vpc_public_subnet_cidrs" { description = "A list of public subnets CIDR to be created inside the VPC" default = [] type = list(any) } -variable "private_subnet_enabled" { +variable "vpc_private_subnet_enabled" { description = "Set true to enable private subnets" default = false type = bool } -variable "private_subnet_cidrs" { +variable "vpc_private_subnet_cidrs" { description = "A list of private subnets CIDR to be created inside the VPC" default = [] type = list(any) @@ -59,13 +81,13 @@ variable "database_subnet_cidrs" { type = list(any) } -variable "intra_subnet_enabled" { +variable "vpc_intra_subnet_enabled" { description = "Set true to enable intra subnets" default = false type = bool } -variable "intra_subnet_cidrs" { +variable "vpc_intra_subnet_cidrs" { description = "A list of intra subnets CIDR to be created" default = [] type = list(any) @@ -129,25 +151,25 @@ variable "default_network_acl_ingress" { ] } -variable "one_nat_gateway_per_az" { +variable "vpc_one_nat_gateway_per_az" { description = "Set to true if a NAT Gateway is required per availability zone for Private Subnet Tier" default = false type = bool } -variable "flow_log_enabled" { +variable "vpc_flow_log_enabled" { description = "Whether or not to enable VPC Flow Logs" type = bool default = false } -variable "flow_log_cloudwatch_log_group_retention_in_days" { +variable "vpc_flow_log_cloudwatch_log_group_retention_in_days" { description = "Specifies the number of days you want to retain log events in the specified log group for VPC flow logs." type = number default = null } -variable "flow_log_max_aggregation_interval" { +variable "vpc_flow_log_max_aggregation_interval" { description = "The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: `60` seconds or `600` seconds." type = number default = 60 @@ -216,18 +238,12 @@ variable "secondry_cidr_enabled" { type = bool } -variable "enable_database_subnet_group" { +variable "database_subnet_group_enabled" { description = "Whether create database subnet groups" default = false type = bool } -# variable "tags" { -# description = "The Tags attached with the resources" -# default = {} -# type = any -# } - variable "ipam_pool_id" { description = "The existing IPAM pool id if any" default = null @@ -252,19 +268,13 @@ variable "ipv4_netmask_length" { type = number } -variable "region" { - description = "The AWS region name" - type = string - default = null -} - variable "existing_ipam_managed_cidr" { description = "The existing IPAM pool CIDR" default = "" type = string } -variable "flow_log_cloudwatch_log_group_skip_destroy" { +variable "vpc_flow_log_cloudwatch_log_group_skip_destroy" { description = " Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state" type = bool default = false @@ -281,3 +291,57 @@ variable "vpc_ecr_endpoint_enabled" { type = bool default = false } + +variable "vpn_gateway_enabled" { + description = "Whether to enable vpn Gateway" + type = bool + default = false +} + +variable "dns_hostnames_enabled" { + description = "Whether to enable DNS hostnames" + type = bool + default = true +} + +variable "vpc_manage_default_network_acl" { + description = "Should be true to manage Default Network ACL" + type = bool + default = true +} + +variable "vpc_flow_log_traffic_type" { + description = "The type of traffic to capture. Valid values: ACCEPT, REJECT, ALL" + type = string + default = "ALL" +} + +variable "vpc_flow_log_destination_type" { + description = "Type of flow log destination. Can be s3 or cloud-watch-logs" + type = string + default = "cloud-watch-logs" +} + +variable "manage_vpc_default_security_group" { + description = "Should be true to manage Default Security group of vpc" + type = bool + default = true +} + +variable "create_database_nat_gateway_route" { + description = "Nat Gateway route to be created for internet access to database subnets" + type = bool + default = false +} + +# variable "tags" { +# description = "The Tags attached with the resources" +# default = {} +# type = any +# } + +# variable "region" { +# description = "The AWS region name" +# type = string +# default = null +# } \ No newline at end of file From 203e8c5b5dca6992e3b6fe3f570f242a13fbc1e3 Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:33:57 +0530 Subject: [PATCH 2/7] Add files via upload Changed the hashicorp version for aws from 4.23 to 5.0.0 --- versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.tf b/versions.tf index dffc488..d8e2113 100644 --- a/versions.tf +++ b/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.23" + version = ">= 5.0.0" } } } From fd40a53c3bc45ca406d397d23dd595b00ccc8f9d Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:06:21 +0530 Subject: [PATCH 3/7] Update README.md for logo --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a47a2d9..b9671cd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,15 @@ # AWS Network Terraform module ![squareops_avatar] +[squarops_avatar]: + + + + Shows an illustrated sun in light mode and a moon with stars in dark mode. + -[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png + +### [squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png ### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. From 92f9f22619f5440f89447e98a4f8b1175aeef701 Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:07:10 +0530 Subject: [PATCH 4/7] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index b9671cd..97b3d64 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # AWS Network Terraform module ![squareops_avatar] -[squarops_avatar]: From 9a871bb3558b1a9839ba66a82b1bd5a8703d1d81 Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:07:56 +0530 Subject: [PATCH 5/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 97b3d64..f87c499 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # AWS Network Terraform module ![squareops_avatar] +[squareops_avatar] From 321d2efab1d326c7d76205757a92fd0d3d727620 Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:11:33 +0530 Subject: [PATCH 6/7] Update README.md --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index f87c499..edf1318 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,7 @@ # AWS Network Terraform module ![squareops_avatar] -[squareops_avatar] - - - - Shows an illustrated sun in light mode and a moon with stars in dark mode. - - - -### [squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png +[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png ### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. From 0a692856ba672fb336f92be6e2a0a8199188356b Mon Sep 17 00:00:00 2001 From: rachit89 <115970922+rachit89@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:13:02 +0530 Subject: [PATCH 7/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index edf1318..a47a2d9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # AWS Network Terraform module ![squareops_avatar] + [squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png ### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey.