This repository was archived by the owner on Mar 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdatasources.tf
More file actions
38 lines (31 loc) · 1.39 KB
/
datasources.tf
File metadata and controls
38 lines (31 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Datasource resources
# Gets a list of Availability Domains
data "oci_identity_availability_domains" "ADs" {
compartment_id = "${var.tenancy_ocid}"
}
# Gets the OCID of the OS image to use
data "oci_core_images" "OLImageOCID" {
compartment_id = "${var.compartment_ocid}"
operating_system = "${var.InstanceOS}"
operating_system_version = "${var.InstanceOSVersion}"
}
# Gets a list of vNIC attachments on DSE_OPSC
data "oci_core_vnic_attachments" "DSE_OPSC_Vnics" {
compartment_id = "${var.compartment_ocid}"
availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}"
instance_id = "${oci_core_instance.DSE_OPSC.id}"
}
# Gets the OCID of the first (default) vNIC on DSE_OPSC
data "oci_core_vnic" "DSE_OPSC_Vnic" {
vnic_id = "${lookup(data.oci_core_vnic_attachments.DSE_OPSC_Vnics.vnic_attachments[0],"vnic_id")}"
}
# Gets a list of vNIC attachments on DSE_Node_0
data "oci_core_vnic_attachments" "DSE_Node_0_Vnics" {
compartment_id = "${var.compartment_ocid}"
availability_domain = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[0],"name")}"
instance_id = "${oci_core_instance.DSE_Node_0.id}"
}
# Gets the OCID of the first (default) vNIC on DSE_Node_0
data "oci_core_vnic" "DSE_Node_0_Vnic" {
vnic_id = "${lookup(data.oci_core_vnic_attachments.DSE_Node_0_Vnics.vnic_attachments[0],"vnic_id")}"
}