1 # Create a network interface for the data-plane traffic
3 resource "azurerm_network_interface" "dut1_if2" {
5 location = azurerm_resource_group.CSIT.location
6 resource_group_name = azurerm_resource_group.CSIT.name
7 network_security_group_id = azurerm_network_security_group.CSIT.id
8 enable_ip_forwarding = "true"
9 enable_accelerated_networking = "true"
13 subnet_id = azurerm_subnet.c.id
14 private_ip_address_allocation = "Static"
15 private_ip_address = "172.16.200.101"
19 data "azurerm_network_interface" "dut1_if2" {
21 resource_group_name = azurerm_resource_group.CSIT.name
22 depends_on = [azurerm_virtual_machine.dut1]
25 resource "azurerm_network_interface" "dut2_if1" {
27 location = azurerm_resource_group.CSIT.location
28 resource_group_name = azurerm_resource_group.CSIT.name
29 network_security_group_id = azurerm_network_security_group.CSIT.id
30 enable_ip_forwarding = "true"
31 enable_accelerated_networking = "true"
35 subnet_id = azurerm_subnet.c.id
36 private_ip_address_allocation = "Static"
37 private_ip_address = "172.16.200.102"
41 data "azurerm_network_interface" "dut2_if1" {
43 resource_group_name = azurerm_resource_group.CSIT.name
44 depends_on = [azurerm_virtual_machine.dut2]
47 resource "azurerm_network_interface" "dut1_if1" {
49 location = azurerm_resource_group.CSIT.location
50 resource_group_name = azurerm_resource_group.CSIT.name
51 network_security_group_id = azurerm_network_security_group.CSIT.id
52 enable_ip_forwarding = "true"
53 enable_accelerated_networking = "true"
57 subnet_id = azurerm_subnet.b.id
58 private_ip_address_allocation = "Static"
59 private_ip_address = "172.16.10.11"
63 data "azurerm_network_interface" "dut1_if1" {
65 resource_group_name = azurerm_resource_group.CSIT.name
66 depends_on = [azurerm_virtual_machine.dut1]
69 resource "azurerm_network_interface" "dut2_if2" {
71 location = azurerm_resource_group.CSIT.location
72 resource_group_name = azurerm_resource_group.CSIT.name
73 network_security_group_id = azurerm_network_security_group.CSIT.id
74 enable_ip_forwarding = "true"
75 enable_accelerated_networking = "true"
79 subnet_id = azurerm_subnet.d.id
80 private_ip_address_allocation = "Static"
81 private_ip_address = "172.16.20.11"
85 data "azurerm_network_interface" "dut2_if2" {
87 resource_group_name = azurerm_resource_group.CSIT.name
88 depends_on = [azurerm_virtual_machine.dut2]
91 resource "azurerm_network_interface" "tg_if1" {
93 location = azurerm_resource_group.CSIT.location
94 resource_group_name = azurerm_resource_group.CSIT.name
95 network_security_group_id = azurerm_network_security_group.CSIT.id
96 enable_ip_forwarding = "true"
97 enable_accelerated_networking = "true"
101 subnet_id = azurerm_subnet.b.id
102 private_ip_address_allocation = "Static"
103 private_ip_address = "172.16.10.250"
107 data "azurerm_network_interface" "tg_if1" {
109 resource_group_name = azurerm_resource_group.CSIT.name
110 depends_on = [azurerm_virtual_machine.tg]
113 resource "azurerm_network_interface" "tg_if2" {
115 location = azurerm_resource_group.CSIT.location
116 resource_group_name = azurerm_resource_group.CSIT.name
117 network_security_group_id = azurerm_network_security_group.CSIT.id
118 enable_ip_forwarding = "true"
119 enable_accelerated_networking = "true"
123 subnet_id = azurerm_subnet.d.id
124 private_ip_address_allocation = "Static"
125 private_ip_address = "172.16.20.250"
129 data "azurerm_network_interface" "tg_if2" {
131 resource_group_name = azurerm_resource_group.CSIT.name
132 depends_on = [azurerm_virtual_machine.tg]