Skip to content

VNET Data Source

Corey Melanson edited this page Jul 19, 2018 · 1 revision

Parameters

The opennebula_vnet data source can be used to get the ID of an VNET which is not managed by Terraform. It accepts only the following parameter:

Parameter Optional Description
name Required Name of the VNET to find

Example

data "opennebula_vnet" "ExistingVnet" {
  name = "My_Service_VNET"
}

Usage in a VM resource

resource "opennebula_vm" "demo" {
  nic {
    network_id = "${data.opennebula_vnet.ExistingVnet.id}"
  }
}
Clone this wiki locally