+ }
+ }
+ }
+}
+
+eesource "null_resource" "deploy_topology" {
+ depends_on = [ azurerm_virtual_machine.tg,
+ azurerm_network_interface.tg_if1,
+ azurerm_network_interface.tg_if2,
+ azurerm_virtual_machine.dut1,
+ azurerm_network_interface.dut1_if1,
+ azurerm_network_interface.dut1_if2
+ azurerm_virtual_machine.dut2,
+ azurerm_network_interface.dut2_if1,
+ azurerm_network_interface.dut2_if2 ]
+ provisioner "ansible" {
+ plays {
+ playbook {
+ file_path = "../../testbed-setup/ansible/cloud_topology.yaml"
+ }
+ hosts = ["local"]
+ extra_vars = {
+ ansible_python_interpreter = "/usr/bin/python3"
+ cloud_topology = "azure"
+ tg_if1_mac = azurerm_network_interface.tg_if1.mac_address
+ tg_if2_mac = azurerm_network_interface.tg_if2.mac_address
+ dut1_if1_mac = azurerm_network_interface.dut1_if1.mac_address
+ dut1_if2_mac = azurerm_network_interface.dut1_if2.mac_address