Skip to content

Security Group Data Source

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

Parameters

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

Parameter Optional Description
name Required Name of the Security Group to find

Example

data "opennebula_secgroup" "ExistingSecGroup" {
  name = "My_Service_SecGroup"
}
 
#Usage in a VNET resource
resource "opennebula_vnet" "demo" {
  security_groups = ["${data.opennebula_secgroup.ExistingSecGroup.id}"]
}
Clone this wiki locally