This repository has been archived by the owner on May 13, 2024. It is now read-only.
generated from oracle-quickstart/oci-quickstart-template
-
Notifications
You must be signed in to change notification settings - Fork 10
/
datasources.tf
74 lines (62 loc) · 2.12 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
## Copyright © 2021, 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
# Gets a list of Availability Domains
data "oci_identity_availability_domains" "ad" {
compartment_id = var.tenancy_ocid
}
data "template_file" "ad_names" {
count = length(
data.oci_identity_availability_domains.ad.availability_domains,
)
template = data.oci_identity_availability_domains.ad.availability_domains[count.index]["name"]
}
data "oci_core_vnic_attachments" "bastion_VNIC1_attach" {
count = var.use_bastion_service ? 0 : 1
availability_domain = var.availablity_domain_name
compartment_id = var.compartment_ocid
instance_id = oci_core_instance.JenkinsBastion[count.index].id
}
data "oci_core_vnic" "bastion_VNIC1" {
count = var.use_bastion_service ? 0 : 1
vnic_id = data.oci_core_vnic_attachments.bastion_VNIC1_attach[count.index].vnic_attachments.0.vnic_id
}
data "oci_core_images" "controller_image" {
compartment_id = var.compartment_ocid
operating_system = var.instance_os
operating_system_version = var.linux_os_version
shape = var.controller_shape
filter {
name = "display_name"
values = ["^.*Oracle[^G]*$"]
regex = true
}
}
data "oci_core_images" "agent_image" {
compartment_id = var.compartment_ocid
operating_system = var.instance_os
operating_system_version = var.linux_os_version
shape = var.agent_shape
filter {
name = "display_name"
values = ["^.*Oracle[^G]*$"]
regex = true
}
}
data "oci_core_images" "bastion_image" {
compartment_id = var.compartment_ocid
operating_system = var.instance_os
operating_system_version = var.linux_os_version
shape = var.bastion_shape
filter {
name = "display_name"
values = ["^.*Oracle[^G]*$"]
regex = true
}
}
data "oci_identity_region_subscriptions" "home_region_subscriptions" {
tenancy_id = var.tenancy_ocid
filter {
name = "is_home_region"
values = [true]
}
}