-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
81 lines (65 loc) · 2.75 KB
/
outputs.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
## Copyright © 2022, 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
# output "cluster" {
# value = {
# id = oci_containerengine_cluster.oci_oke_cluster.id
# kubernetes_version = oci_containerengine_cluster.oci_oke_cluster.kubernetes_version
# name = oci_containerengine_cluster.oci_oke_cluster.name
# }
# }
# output "node_pool" {
# value = {
# id = oci_containerengine_node_pool.oci_oke_node_pool.id
# kubernetes_version = oci_containerengine_node_pool.oci_oke_node_pool.kubernetes_version
# name = oci_containerengine_node_pool.oci_oke_node_pool.name
# }
# }
# output "chosen_node_shape_and_image" {
# value = {
# image_id = element([for source in data.oci_containerengine_node_pool_option.oci_oke_node_pool_option.sources : source.image_id if length(regexall("Oracle-Linux-${var.node_linux_version}-20[0-9]*.*", source.source_name)) > 0], 0)
# source_name = element([for source in data.oci_containerengine_node_pool_option.oci_oke_node_pool_option.sources : source.source_name if length(regexall("Oracle-Linux-${var.node_linux_version}-20[0-9]*.*", source.source_name)) > 0], 0)
# }
# }
# output "KubeConfig" {
# value = data.oci_containerengine_cluster_kube_config.KubeConfig.content
# }
# output "services" {
# value = data.oci_core_services.AllOCIServices
# }
# output "k8s" {
# value = reverse(data.oci_containerengine_cluster_option.cluster_options.kubernetes_versions)[0]
# }
# output "node-options" {
# value = data.oci_containerengine_node_pool_option.oci_oke_node_pool_option
# }
# output "images" {
# value = var.np1_image_id == null ? {
# gpu = local.gpu
# arm = local.arm
# x86 = local.x86
# } : {}
# }
# # output test_image {
# # value = data.oci_core_image_shapes.test_image_shapes
# # }
# output "test_cidr" {
# value = cidrsubnets("10.0.0.0/16", 15, 4, 4, 4)
# }
output "access_command" {
value = "oci ce cluster create-kubeconfig --cluster-id ${oci_containerengine_cluster.oci_oke_cluster.id} --file $HOME/.kube/config --region ${var.region} --token-version 2.0.0 --kube-endpoint ${var.is_endpoint_public ? "PUBLIC_ENDPOINT" : "PRIVATE_ENDPOINT"}"
}
output "flink_demo_job" {
value = "kubectl create -f https://raw.githubusercontent.com/apache/flink-kubernetes-operator/release-1.3/examples/basic.yaml"
}
output "flink_ui_port_forward" {
value = "kubectl port-forward svc/basic-example-rest 8081"
}
output "flink_ui_access" {
value = "http://localhost:8081"
}
output "cluster_id" {
value = oci_containerengine_cluster.oci_oke_cluster.id
}
output "cluster_name" {
value = "${var.cluster_name}-${random_string.deploy_id.result}"
}