Skip to content

Commit

Permalink
fix: dropping ipv6 for a moment in order to get a working version (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
gambol99 authored Apr 23, 2024
1 parent 96d3e5d commit d9da3a8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 44 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,9 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
| <a name="input_exclude_route53_resolver_rules"></a> [exclude\_route53\_resolver\_rules](#input\_exclude\_route53\_resolver\_rules) | List of resolver rules to exclude from association | `list(string)` | `[]` | no |
| <a name="input_ipam_pool_id"></a> [ipam\_pool\_id](#input\_ipam\_pool\_id) | An optional pool id to use for IPAM pool to use | `string` | `null` | no |
| <a name="input_nat_gateway_mode"></a> [nat\_gateway\_mode](#input\_nat\_gateway\_mode) | The configuration mode of the NAT gateways | `string` | `"none"` | no |
| <a name="input_private_subnet_assign_ipv6_cidr"></a> [private\_subnet\_assign\_ipv6\_cidr](#input\_private\_subnet\_assign\_ipv6\_cidr) | If enabled, assigns and IPv6 range to the subnet | `bool` | `null` | no |
| <a name="input_public_subnet_assign_ipv6_cidr"></a> [public\_subnet\_assign\_ipv6\_cidr](#input\_public\_subnet\_assign\_ipv6\_cidr) | If enabled, assigns and IPv6 range to the subnet | `bool` | `null` | no |
| <a name="input_public_subnet_netmask"></a> [public\_subnet\_netmask](#input\_public\_subnet\_netmask) | The netmask for the public subnets | `number` | `0` | no |
| <a name="input_transit_gateway_id"></a> [transit\_gateway\_id](#input\_transit\_gateway\_id) | If enabled, and not lookup is disabled, the transit gateway id to connect to | `string` | `""` | no |
| <a name="input_transit_gateway_routes"></a> [transit\_gateway\_routes](#input\_transit\_gateway\_routes) | If enabled, this is the cidr block to route down the transit gateway | `map(string)` | <pre>{<br> "private": "10.0.0.0/8"<br>}</pre> | no |
| <a name="input_transit_gateway_subnet_assign_ipv6_cidr"></a> [transit\_gateway\_subnet\_assign\_ipv6\_cidr](#input\_transit\_gateway\_subnet\_assign\_ipv6\_cidr) | If enabled, assigns and IPv6 range to the subnet | `bool` | `null` | no |
| <a name="input_vpc_assign_generated_ipv6_cidr_block"></a> [vpc\_assign\_generated\_ipv6\_cidr\_block](#input\_vpc\_assign\_generated\_ipv6\_cidr\_block) | If enabled, assigns an AWS owned IPv6 CIDR block to the VPC | `bool` | `null` | no |
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | An optional cidr block to assign to the VPC (if not using IPAM) | `string` | `null` | no |
| <a name="input_vpc_instance_tenancy"></a> [vpc\_instance\_tenancy](#input\_vpc\_instance\_tenancy) | The name of the VPC to create | `string` | `"default"` | no |
| <a name="input_vpc_netmask"></a> [vpc\_netmask](#input\_vpc\_netmask) | An optional range assigned to the VPC | `number` | `null` | no |
Expand Down
3 changes: 0 additions & 3 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ locals {
private = {
connect_to_public_natgw = var.enable_nat_gateway ? true : false
netmask = var.private_subnet_netmask
assign_ipv6_cidr = var.private_subnet_assign_ipv6_cidr
tags = var.tags
}
} : null
Expand All @@ -20,7 +19,6 @@ locals {
public = {
nat_gateway_configuration = var.nat_gateway_mode
netmask = var.public_subnet_netmask
assign_ipv6_cidr = var.public_subnet_assign_ipv6_cidr
tags = var.tags
}
} : null
Expand All @@ -29,7 +27,6 @@ locals {
transit_gateway = {
connect_to_public_natgw = var.enable_transit_gateway_subnet_natgw
netmask = 28
assign_ipv6_cidr = var.transit_gateway_subnet_assign_ipv6_cidr
tags = var.tags
transit_gateway_appliance_mode_support = var.enable_transit_gateway_appliance_mode ? "enable" : "disable"
transit_gateway_default_route_table_association = var.enable_default_route_table_association
Expand Down
25 changes: 12 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ module "vpc" {
source = "aws-ia/vpc/aws"
version = "4.4.2"

name = var.name
az_count = var.availability_zones
cidr_block = var.vpc_cidr
subnets = local.subnets
tags = var.tags
transit_gateway_id = local.transit_gateway_id
transit_gateway_routes = local.transit_routes
vpc_instance_tenancy = var.vpc_instance_tenancy
vpc_enable_dns_hostnames = true
vpc_enable_dns_support = true
vpc_ipv4_ipam_pool_id = var.enable_ipam ? var.ipam_pool_id : null
vpc_ipv4_netmask_length = var.vpc_netmask
vpc_assign_generated_ipv6_cidr_block = var.vpc_assign_generated_ipv6_cidr_block
name = var.name
az_count = var.availability_zones
cidr_block = var.vpc_cidr
subnets = local.subnets
tags = var.tags
transit_gateway_id = local.transit_gateway_id
transit_gateway_routes = local.transit_routes
vpc_instance_tenancy = var.vpc_instance_tenancy
vpc_enable_dns_hostnames = true
vpc_enable_dns_support = true
vpc_ipv4_ipam_pool_id = var.enable_ipam ? var.ipam_pool_id : null
vpc_ipv4_netmask_length = var.vpc_netmask
}

## Associate any resolver rules with the vpc if required
Expand Down
24 changes: 0 additions & 24 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,30 +108,12 @@ variable "private_subnet_netmask" {
}
}

variable "private_subnet_assign_ipv6_cidr" {
description = "If enabled, assigns and IPv6 range to the subnet"
type = bool
default = null
}

variable "public_subnet_netmask" {
description = "The netmask for the public subnets"
type = number
default = 0
}

variable "public_subnet_assign_ipv6_cidr" {
description = "If enabled, assigns and IPv6 range to the subnet"
type = bool
default = null
}

variable "transit_gateway_subnet_assign_ipv6_cidr" {
description = "If enabled, assigns and IPv6 range to the subnet"
type = bool
default = null
}

variable "tags" {
description = "Tags to apply to all resources"
type = map(string)
Expand All @@ -157,12 +139,6 @@ variable "vpc_cidr" {
default = null
}

variable "vpc_assign_generated_ipv6_cidr_block" {
description = "If enabled, assigns an AWS owned IPv6 CIDR block to the VPC"
type = bool
default = null
}

variable "vpc_netmask" {
description = "An optional range assigned to the VPC"
type = number
Expand Down

0 comments on commit d9da3a8

Please sign in to comment.