From 7a8ba1acd4082d564955ca839e4e817ad4603d39 Mon Sep 17 00:00:00 2001 From: darrenhorwitz1 Date: Wed, 17 May 2023 22:30:17 +0200 Subject: [PATCH 1/3] fix: fixed bug on ipv6_subnets_cwan_routed local variable that referrences incorrect keys --- data.tf | 2 +- examples/cloud_wan/README.md | 4 ++-- examples/cloud_wan/main.tf | 16 +++++----------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/data.tf b/data.tf index feb6307..39f7bad 100644 --- a/data.tf +++ b/data.tf @@ -45,7 +45,7 @@ locals { private_subnet_key_names_cwan_routes = [for subnet in local.private_per_az : subnet if contains(local.subnets_cwan_routed, split("/", subnet)[0])] # support variables for core_network_ipv6_routes - ipv6_subnets_cwan_routed = keys(var.core_network_routes) + ipv6_subnets_cwan_routed = keys(var.core_network_ipv6_routes) ipv6_private_subnet_keys_names_cwan_routes = [for subnet in local.private_per_az : subnet if contains(local.ipv6_subnets_cwan_routed, split("/", subnet)[0])] # support variables for core_network subnets diff --git a/examples/cloud_wan/README.md b/examples/cloud_wan/README.md index 9848bff..adb79e4 100644 --- a/examples/cloud_wan/README.md +++ b/examples/cloud_wan/README.md @@ -28,8 +28,8 @@ This example shows how you can use this module with `core_network` subnets, and | Name | Source | Version | |------|--------|---------| -| [ireland\_vpc](#module\_ireland\_vpc) | aws-ia/vpc/aws | >= 4.2.0 | -| [nvirginia\_vpc](#module\_nvirginia\_vpc) | aws-ia/vpc/aws | >= 4.2.0 | +| [ireland\_vpc](#module\_ireland\_vpc) | ../.. | n/a | +| [nvirginia\_vpc](#module\_nvirginia\_vpc) | ../.. | n/a | ## Resources diff --git a/examples/cloud_wan/main.tf b/examples/cloud_wan/main.tf index 4061d2e..0b1c37f 100644 --- a/examples/cloud_wan/main.tf +++ b/examples/cloud_wan/main.tf @@ -1,8 +1,7 @@ # VPC module (North Virginia) module "nvirginia_vpc" { - source = "aws-ia/vpc/aws" - version = ">= 4.2.0" + source = "../.." providers = { aws = aws.awsnvirginia } name = "nvirginia-vpc" @@ -42,13 +41,12 @@ module "nvirginia_vpc" { # VPC module (Ireland) module "ireland_vpc" { - source = "aws-ia/vpc/aws" - version = ">= 4.2.0" + source = "../.." providers = { aws = aws.awsireland } name = "ireland-vpc" cidr_block = "10.0.1.0/24" - vpc_assign_generated_ipv6_cidr_block = true + vpc_assign_generated_ipv6_cidr_block = false az_count = 2 core_network = { @@ -58,18 +56,14 @@ module "ireland_vpc" { core_network_routes = { workload = "0.0.0.0/0" } - core_network_ipv6_routes = { - workload = "::/0" - } - subnets = { workload = { netmask = 28 - assign_ipv6_cidr = true + assign_ipv6_cidr = false } core_network = { netmask = 28 - assign_ipv6_cidr = true + assign_ipv6_cidr = false require_acceptance = false tags = { From 87967b68cf90f0fb4e2f21e58b3624ec833d03c3 Mon Sep 17 00:00:00 2001 From: darrenhorwitz1 Date: Wed, 24 May 2023 17:43:22 +0200 Subject: [PATCH 2/3] fix: reverted terraform module's source and version in cloudwan example --- examples/cloud_wan/README.md | 4 ++-- examples/cloud_wan/main.tf | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/cloud_wan/README.md b/examples/cloud_wan/README.md index adb79e4..9848bff 100644 --- a/examples/cloud_wan/README.md +++ b/examples/cloud_wan/README.md @@ -28,8 +28,8 @@ This example shows how you can use this module with `core_network` subnets, and | Name | Source | Version | |------|--------|---------| -| [ireland\_vpc](#module\_ireland\_vpc) | ../.. | n/a | -| [nvirginia\_vpc](#module\_nvirginia\_vpc) | ../.. | n/a | +| [ireland\_vpc](#module\_ireland\_vpc) | aws-ia/vpc/aws | >= 4.2.0 | +| [nvirginia\_vpc](#module\_nvirginia\_vpc) | aws-ia/vpc/aws | >= 4.2.0 | ## Resources diff --git a/examples/cloud_wan/main.tf b/examples/cloud_wan/main.tf index 0b1c37f..39d1161 100644 --- a/examples/cloud_wan/main.tf +++ b/examples/cloud_wan/main.tf @@ -1,7 +1,9 @@ # VPC module (North Virginia) module "nvirginia_vpc" { - source = "../.." + source = "aws-ia/vpc/aws" + version = ">= 4.2.0" + providers = { aws = aws.awsnvirginia } name = "nvirginia-vpc" @@ -41,7 +43,9 @@ module "nvirginia_vpc" { # VPC module (Ireland) module "ireland_vpc" { - source = "../.." + source = "aws-ia/vpc/aws" + version = ">= 4.2.0" + providers = { aws = aws.awsireland } name = "ireland-vpc" From 801fa4a5fc5efedd21d576de750a93ebf21680c2 Mon Sep 17 00:00:00 2001 From: darrenhorwitz1 Date: Thu, 1 Jun 2023 19:12:11 +0200 Subject: [PATCH 3/3] fix: reverted changes on for ipv6 support cwan example --- examples/cloud_wan/main.tf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/cloud_wan/main.tf b/examples/cloud_wan/main.tf index 39d1161..6c24f06 100644 --- a/examples/cloud_wan/main.tf +++ b/examples/cloud_wan/main.tf @@ -50,7 +50,7 @@ module "ireland_vpc" { name = "ireland-vpc" cidr_block = "10.0.1.0/24" - vpc_assign_generated_ipv6_cidr_block = false + vpc_assign_generated_ipv6_cidr_block = true az_count = 2 core_network = { @@ -60,14 +60,17 @@ module "ireland_vpc" { core_network_routes = { workload = "0.0.0.0/0" } + core_network_ipv6_routes = { + workload = "::/0" + } subnets = { workload = { netmask = 28 - assign_ipv6_cidr = false + assign_ipv6_cidr = true } core_network = { netmask = 28 - assign_ipv6_cidr = false + assign_ipv6_cidr = true require_acceptance = false tags = {