forked from oracle-quickstart/oci-azure-interconnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatasource.tf
64 lines (55 loc) · 1.77 KB
/
datasource.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
# ------ Get a List of Availability Domain
data "oci_identity_availability_domain" "AD" {
provider = oci.oci
compartment_id = var.tenancy_ocid
ad_number = "1"
}
# ------ Get the OCI Tenancy Details
data "oci_identity_tenancy" "tenancy" {
provider = oci.oci
tenancy_id = var.tenancy_ocid
}
# ------ Get the OCI Fast Connect Providors Details
data "oci_core_fast_connect_provider_services" "test_fast_connect_provider_services" {
provider = oci.oci
compartment_id = var.compartment_ocid
}
# ------ Get the Microsoft Azure Providor Details
data "oci_core_fast_connect_provider_service" "test_fast_connect_provider_service" {
provider = oci.oci
provider_service_id = "${lookup(element(data.oci_core_fast_connect_provider_services.test_fast_connect_provider_services.fast_connect_provider_services, index(data.oci_core_fast_connect_provider_services.test_fast_connect_provider_services.fast_connect_provider_services.*.provider_name, "Microsoft Azure")), "id")}"
}
# ------ Memory in gbs
variable "instance_shape_config_memory_in_gbs" {
default = "50"
}
# ------ Cpu's
variable "instance_shape_config_ocpus" {
default = "1"
}
# ------ Define a Variable for Shape
variable "shape" {
type = map
default = {
10000 = "10 Gbps"
5000 = "5 Gbps"
2000 = "2 Gbps"
1000 = "1 Gbps"
50 = "1 Gbps" #Test bandwidth
}
}
data "http" "myip" {
url = "http://ipv4.icanhazip.com/"
}
# ------ Get the latest Oracle Linux image
data "oci_core_images" "InstanceImageOCID" {
provider = oci.oci
compartment_id = var.compartment_ocid
# operating_system = var.instance_os
# operating_system_version = var.linux_os_version
filter {
name = "display_name"
values = ["^.*Oracle[^G]*$"]
regex = true
}
}