Skip to content

Commit

Permalink
chore: updated module to use v4.0.0 [major]
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanoolala committed Aug 11, 2023
1 parent dcf1876 commit e929c15
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 1 deletion.
21 changes: 20 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_eip" "nat" {

# virtual private cloud creator
module "vpc" {
source = "github.com/GovTechSG/terraform-aws-vpc-forked?ref=v3.7.0"
source = "github.com/GovTechSG/terraform-aws-vpc-forked?ref=v4.0.0"

# meta data
name = var.vpc_name
Expand Down Expand Up @@ -110,6 +110,25 @@ module "vpc" {
# others
map_public_ip_on_launch = var.map_public_ip_on_launch
tags = merge(var.tags, local.vpc_tags)

manage_default_vpc = var.manage_default_vpc
default_vpc_tags = var.default_vpc_tags
default_vpc_name = var.default_vpc_name
default_vpc_enable_dns_support = var.default_vpc_enable_dns_support
default_vpc_enable_dns_hostnames = var.default_vpc_enable_dns_hostnames

manage_default_security_group = var.manage_default_security_group
default_security_group_name = var.default_security_group_name
default_security_group_ingress = var.default_security_group_ingress
default_security_group_egress = var.default_security_group_egress
default_security_group_tags = var.default_security_group_tags

manage_default_route_table = var.manage_default_route_table
default_route_table_name = var.default_route_table_name
default_route_table_propagating_vgws = var.default_route_table_propagating_vgws
default_route_table_routes = var.default_route_table_routes
default_route_table_tags = var.default_route_table_tags

}

#######################
Expand Down
99 changes: 99 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,102 @@ variable "default_network_acl_tags" {
type = map(string)
default = {}
}

################################################################################
# Default VPC
################################################################################

variable "manage_default_vpc" {
description = "Should be true to adopt and manage Default VPC"
type = bool
default = false
}

variable "default_vpc_name" {
description = "Name to be used on the Default VPC"
type = string
default = null
}

variable "default_vpc_enable_dns_support" {
description = "Should be true to enable DNS support in the Default VPC"
type = bool
default = true
}

variable "default_vpc_enable_dns_hostnames" {
description = "Should be true to enable DNS hostnames in the Default VPC"
type = bool
default = true
}

variable "default_vpc_tags" {
description = "Additional tags for the Default VPC"
type = map(string)
default = {}
}

variable "manage_default_security_group" {
description = "Should be true to adopt and manage default security group"
type = bool
default = true
}

variable "default_security_group_name" {
description = "Name to be used on the default security group"
type = string
default = null
}

variable "default_security_group_ingress" {
description = "List of maps of ingress rules to set on the default security group"
type = list(map(string))
default = []
}

variable "default_security_group_egress" {
description = "List of maps of egress rules to set on the default security group"
type = list(map(string))
default = []
}

variable "default_security_group_tags" {
description = "Additional tags for the default security group"
type = map(string)
default = {}
}


################################################################################
# Default Route
################################################################################

variable "manage_default_route_table" {
description = "Should be true to manage default route table"
type = bool
default = true
}

variable "default_route_table_name" {
description = "Name to be used on the default route table"
type = string
default = null
}

variable "default_route_table_propagating_vgws" {
description = "List of virtual gateways for propagation"
type = list(string)
default = []
}

variable "default_route_table_routes" {
description = "Configuration block of routes. See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_route_table#route"
type = list(map(string))
default = []
}

variable "default_route_table_tags" {
description = "Additional tags for the default route table"
type = map(string)
default = {}
}

0 comments on commit e929c15

Please sign in to comment.