From 7406115dceba2c7405ffba2d27c600af10c17f86 Mon Sep 17 00:00:00 2001 From: kaif Date: Mon, 20 Mar 2023 16:55:32 +0530 Subject: [PATCH] examples/aws_tworegion_cloudha: fix interface ips - This is to make cicada work, we would like to have similar cidr block configuration as multicloud-tworegion-cloudha topology. - verified this by running test in both cicada and non-cicada mode Change-Id: I848c7e3dfe63b22ebe3abff417bf18082b623abf --- .../aws_tworegion_cloudha/input_vars.tfvars | 32 +++++++++---------- .../aws_tworegion_cloudha/leaf/leaf.tf | 16 +++++----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/terraform/examples/aws_tworegion_cloudha/input_vars.tfvars b/terraform/examples/aws_tworegion_cloudha/input_vars.tfvars index 21f92dd..8bc855e 100644 --- a/terraform/examples/aws_tworegion_cloudha/input_vars.tfvars +++ b/terraform/examples/aws_tworegion_cloudha/input_vars.tfvars @@ -140,25 +140,25 @@ vpc_info = { subnet_cidr = ["10.3.0.0/24", "10.3.1.0/24", "10.3.2.0/24", "10.3.3.0/24"] interface_ips = ["10.3.0.101", "10.3.1.101", "10.3.2.101", "10.3.3.101"] } - region2_leaf1_vpc = { - vpc_cidr = "10.1.0.0/16" - subnet_cidr = ["10.1.0.0/24", "10.1.1.0/24", "10.1.2.0/24", "10.1.3.0/24"] - interface_ips = ["10.1.0.101", "10.1.1.101", "10.1.1.102", "10.1.2.101", "10.1.3.101", "10.1.3.102"] + region2_leaf1_vpc = { + vpc_cidr = "10.7.0.0/16" + subnet_cidr = ["10.7.0.0/24", "10.7.1.0/24", "10.7.2.0/24", "10.7.3.0/24"] + interface_ips = ["10.7.0.101", "10.7.1.101", "10.7.2.101", "10.7.3.101", "10.7.1.102", "10.7.3.102"] } - region2_leaf2_vpc = { - vpc_cidr = "10.4.0.0/16" - subnet_cidr = ["10.4.0.0/24", "10.4.1.0/24", "10.4.2.0/24", "10.4.3.0/24"] - interface_ips = ["10.4.0.101", "10.4.1.101", "10.4.1.102", "10.4.2.101", "10.4.3.101", "10.4.3.102"] + region2_leaf2_vpc = { + vpc_cidr = "10.8.0.0/16" + subnet_cidr = ["10.8.0.0/24", "10.8.1.0/24", "10.8.2.0/24", "10.8.3.0/24"] + interface_ips = ["10.8.0.101", "10.8.1.101", "10.8.2.101", "10.8.3.101", "10.8.1.102", "10.8.3.102"] } - region3_leaf1_vpc = { - vpc_cidr = "10.5.0.0/16" - subnet_cidr = ["10.5.0.0/24", "10.5.1.0/24", "10.5.2.0/24", "10.5.3.0/24"] - interface_ips = ["10.5.0.101", "10.5.1.101", "10.5.1.102", "10.5.2.101", "10.5.3.101", "10.5.3.102"] + region3_leaf1_vpc = { + vpc_cidr = "10.9.0.0/16" + subnet_cidr = ["10.9.0.0/24", "10.9.1.0/24", "10.9.2.0/24", "10.9.3.0/24"] + interface_ips = ["10.9.0.101", "10.9.1.101", "10.9.2.101", "10.9.3.101", "10.9.1.102", "10.9.3.102"] } - region3_leaf2_vpc = { - vpc_cidr = "10.6.0.0/16" - subnet_cidr = ["10.6.0.0/24", "10.6.1.0/24", "10.6.2.0/24", "10.6.3.0/24"] - interface_ips = ["10.6.0.101", "10.6.1.101", "10.6.1.102", "10.6.2.101", "10.6.3.101", "10.6.3.102"] + region3_leaf2_vpc = { + vpc_cidr = "10.10.0.0/16" + subnet_cidr = ["10.10.0.0/24", "10.10.1.0/24", "10.10.2.0/24", "10.10.3.0/24"] + interface_ips = ["10.10.0.101", "10.10.1.101", "10.10.2.101", "10.10.3.101", "10.10.1.102", "10.10.3.102"] } } diff --git a/terraform/examples/aws_tworegion_cloudha/leaf/leaf.tf b/terraform/examples/aws_tworegion_cloudha/leaf/leaf.tf index d14f350..bab269c 100644 --- a/terraform/examples/aws_tworegion_cloudha/leaf/leaf.tf +++ b/terraform/examples/aws_tworegion_cloudha/leaf/leaf.tf @@ -101,7 +101,7 @@ module "Region2Leaf1host1" { instance_type = "t2.medium" keypair_name = var.keypair_name[module.Region2Leaf1Vpc.region] subnet_id = module.Region2Leaf1Subnet.vpc_subnets[1] - private_ips = [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][2])] + private_ips = [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][4])] tags = { "Name" = "${var.topology}-Region2Leaf1host1" } @@ -126,7 +126,7 @@ module "Region2Leaf1CloudEOS2" { "${var.topology}-Region2Leaf1CloudEOS2Intf0" = module.Region2Leaf1Subnet.vpc_subnets[2] "${var.topology}-Region2Leaf1CloudEOS2Intf1" = module.Region2Leaf1Subnet.vpc_subnets[3] } - private_ips = { "0" : [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][3])], "1" : [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][4])] } + private_ips = { "0" : [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][2])], "1" : [(var.vpc_info["region2_leaf1_vpc"]["interface_ips"][3])] } availability_zone = var.availability_zone[module.Region2Leaf1Vpc.region]["zone2"] region = module.Region2Leaf1Vpc.region tags = { @@ -231,7 +231,7 @@ module "Region2Leaf2host1" { instance_type = "t2.medium" keypair_name = var.keypair_name[module.Region2Leaf2Vpc.region] subnet_id = module.Region2Leaf2Subnet.vpc_subnets[1] - private_ips = [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][2])] + private_ips = [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][4])] tags = { "Name" = "${var.topology}-Region2Leaf2host" } @@ -256,7 +256,7 @@ module "Region2Leaf2CloudEOS2" { "${var.topology}-Region2Leaf2CloudEOS2Intf0" = module.Region2Leaf2Subnet.vpc_subnets[2] "${var.topology}-Region2Leaf2CloudEOS2Intf1" = module.Region2Leaf2Subnet.vpc_subnets[3] } - private_ips = { "0" : [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][3])], "1" : [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][4])] } + private_ips = { "0" : [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][2])], "1" : [(var.vpc_info["region2_leaf2_vpc"]["interface_ips"][3])] } availability_zone = var.availability_zone[module.Region2Leaf2Vpc.region]["zone2"] region = module.Region2Leaf2Vpc.region tags = { @@ -363,7 +363,7 @@ module "Region3Leaf1host1" { instance_type = "t2.medium" keypair_name = var.keypair_name[module.Region3Leaf1Vpc.region] subnet_id = module.Region3Leaf1Subnet.vpc_subnets[1] - private_ips = [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][2])] + private_ips = [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][4])] tags = { "Name" = "${var.topology}-Region3Leaf1host1" } @@ -388,7 +388,7 @@ module "Region3Leaf1CloudEOS2" { "${var.topology}-Region3Leaf1CloudEOS2Intf0" = module.Region3Leaf1Subnet.vpc_subnets[2] "${var.topology}-Region3Leaf1CloudEOS2Intf1" = module.Region3Leaf1Subnet.vpc_subnets[3] } - private_ips = { "0" : [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][3])], "1" : [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][4])] } + private_ips = { "0" : [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][2])], "1" : [(var.vpc_info["region3_leaf1_vpc"]["interface_ips"][3])] } availability_zone = var.availability_zone[module.Region3Leaf1Vpc.region]["zone2"] region = module.Region3Leaf1Vpc.region tags = { @@ -493,7 +493,7 @@ module "Region3Leaf2host1" { instance_type = "t2.medium" keypair_name = var.keypair_name[module.Region3Leaf2Vpc.region] subnet_id = module.Region3Leaf2Subnet.vpc_subnets[1] - private_ips = [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][2])] + private_ips = [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][4])] tags = { "Name" = "${var.topology}-Region3Leaf2host1" } @@ -518,7 +518,7 @@ module "Region3Leaf2CloudEOS2" { "${var.topology}-Region3Leaf2CloudEOS2Intf0" = module.Region3Leaf2Subnet.vpc_subnets[2] "${var.topology}-Region3Leaf2CloudEOS2Intf1" = module.Region3Leaf2Subnet.vpc_subnets[3] } - private_ips = { "0" : [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][3])], "1" : [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][4])] } + private_ips = { "0" : [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][2])], "1" : [(var.vpc_info["region3_leaf2_vpc"]["interface_ips"][3])] } availability_zone = var.availability_zone[module.Region3Leaf2Vpc.region]["zone2"] region = module.Region3Leaf2Vpc.region tags = {