diff --git a/terraform/main.tf b/terraform/main.tf index 25bf0e4..e106866 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -69,7 +69,7 @@ module "vms" { data_image_source = "" depends = [ - opennebula_virtual_network["vnet"] + opennebula_virtual_network.vnet["internet"].id ] } diff --git a/terraform/modules/virtualMachine/main.tf b/terraform/modules/virtualMachine/main.tf index 0e06c65..d3ea601 100644 --- a/terraform/modules/virtualMachine/main.tf +++ b/terraform/modules/virtualMachine/main.tf @@ -71,7 +71,7 @@ resource "opennebula_template" "vm_template" { for_each = var.network_interfaces content { - network_id = nic.value.network_id + network_name = nic.value.network_name model = "virtio" ip = nic.value.ip }