-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdatasources.tf
86 lines (69 loc) · 2.62 KB
/
datasources.tf
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## Copyright © 2020, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
# Get the latest Oracle Linux image
data "oci_core_images" "InstanceImageOCID" {
compartment_id = var.compartment_ocid
operating_system = var.instance_os
operating_system_version = var.linux_os_version
shape = var.instance_shape
filter {
name = "display_name"
values = ["^.*Oracle[^G]*$"]
regex = true
}
}
data "oci_core_vnic_attachments" "redis1_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis1.id
}
data "oci_core_vnic" "redis1_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis1_vnics.vnic_attachments.0.vnic_id
}
data "oci_core_vnic_attachments" "redis2_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis2.id
}
data "oci_core_vnic" "redis2_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis2_vnics.vnic_attachments.0.vnic_id
}
data "oci_core_vnic_attachments" "redis3_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis3.id
}
data "oci_core_vnic" "redis3_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis3_vnics.vnic_attachments.0.vnic_id
}
data "oci_core_vnic_attachments" "redis4_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis4.id
}
data "oci_core_vnic" "redis4_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis4_vnics.vnic_attachments.0.vnic_id
}
data "oci_core_vnic_attachments" "redis5_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis5.id
}
data "oci_core_vnic" "redis5_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis5_vnics.vnic_attachments.0.vnic_id
}
data "oci_core_vnic_attachments" "redis6_vnics" {
compartment_id = var.compartment_ocid
availability_domain = var.availablity_domain_name
instance_id = oci_core_instance.redis6.id
}
data "oci_core_vnic" "redis6_vnic" {
vnic_id = data.oci_core_vnic_attachments.redis6_vnics.vnic_attachments.0.vnic_id
}
data "oci_identity_region_subscriptions" "home_region_subscriptions" {
tenancy_id = var.tenancy_ocid
filter {
name = "is_home_region"
values = [true]
}
}