-
Notifications
You must be signed in to change notification settings - Fork 0
/
datasources.tf
68 lines (55 loc) · 1.8 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
## Copyright (c) 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 supported images based on the shape, operating_system and operating_system_version provided
data "oci_core_images" "node_pool_images" {
compartment_id = local.oke_compartment_id
operating_system = var.image_operating_system
operating_system_version = var.image_operating_system_version
shape = var.node_pool_shape
sort_by = "TIMECREATED"
sort_order = "DESC"
}
data "oci_containerengine_cluster_option" "oke" {
cluster_option_id = "all"
}
data "oci_containerengine_node_pool_option" "oke" {
node_pool_option_id = "all"
}
# Gets a list of Availability Domains
data "oci_identity_availability_domains" "ADs" {
compartment_id = var.tenancy_ocid
}
# Gets home and current regions
data "oci_identity_tenancy" "tenant_details" {
tenancy_id = var.tenancy_ocid
provider = oci.current_region
}
data "oci_identity_regions" "home_region" {
filter {
name = "key"
values = [data.oci_identity_tenancy.tenant_details.home_region_key]
}
provider = oci.current_region
}
# Gets kubeconfig
data "oci_containerengine_cluster_kube_config" "oke_cluster_kube_config" {
cluster_id = var.create_new_oke_cluster ? module.oci-oke[0].cluster.id : var.existent_oke_cluster_id
}
# OCI Services
## Available Services
data "oci_core_services" "all_services" {
filter {
name = "name"
values = ["All .* Services In Oracle Services Network"]
regex = true
}
}
## Object Storage
data "oci_objectstorage_namespace" "ns" {
compartment_id = local.oke_compartment_id
}
# Randoms
resource "random_string" "deploy_id" {
length = 4
special = false
}