Skip to content

Commit

Permalink
examples/aws_tworegion_cloudha: fix interface ips
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
kaif1909 committed Mar 20, 2023
1 parent bff2e2c commit 7406115
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions terraform/examples/aws_tworegion_cloudha/input_vars.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}

Expand Down
16 changes: 8 additions & 8 deletions terraform/examples/aws_tworegion_cloudha/leaf/leaf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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 = {
Expand Down Expand Up @@ -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"
}
Expand All @@ -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 = {
Expand Down Expand Up @@ -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"
}
Expand All @@ -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 = {
Expand Down Expand Up @@ -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"
}
Expand All @@ -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 = {
Expand Down

0 comments on commit 7406115

Please sign in to comment.