forked from oracle-terraform-modules/terraform-oci-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatasources.tf
23 lines (19 loc) · 801 Bytes
/
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
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
data "oci_identity_availability_domains" "ad_list" {
compartment_id = var.oci_base_provider.tenancy_id
}
data "template_file" "ad_names" {
count = length(data.oci_identity_availability_domains.ad_list.availability_domains)
template = lookup(data.oci_identity_availability_domains.ad_list.availability_domains[count.index], "name")
}
data "oci_identity_tenancy" "tenancy" {
tenancy_id = var.oci_base_provider.tenancy_id
}
# get the tenancy's home region
data "oci_identity_regions" "home_region" {
filter {
name = "key"
values = [data.oci_identity_tenancy.tenancy.home_region_key]
}
}