Skip to content

Commit 905a24c

Browse files
committed
nodepool module updates
Signed-off-by: junior <junior@users.noreply.github.com>
1 parent 258e827 commit 905a24c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

modules/oke-node-pool/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
output "node_pool_name" {
6-
value = oci_containerengine_node_pool.oke_node_pool.0.name
6+
value = var.create_new_node_pool ? oci_containerengine_node_pool.oke_node_pool.0.name : var.existent_oke_nodepool_id_for_autoscaler
77
}
88
output "node_pool_min_nodes" {
99
value = var.node_pool_min_nodes
@@ -12,7 +12,7 @@ output "node_pool_max_nodes" {
1212
value = var.node_pool_max_nodes
1313
}
1414
output "node_pool_id" {
15-
value = oci_containerengine_node_pool.oke_node_pool.0.id
15+
value = var.create_new_node_pool ? oci_containerengine_node_pool.oke_node_pool.0.id : var.existent_oke_nodepool_id_for_autoscaler
1616
}
1717
output "node_k8s_version" {
1818
value = local.node_k8s_version

modules/oke-node-pool/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ variable "node_pool_node_shape_config_memory_in_gbs" {
4646
default = "16" # Only used if flex shape is selected
4747
description = "You can customize the amount of memory allocated to a flexible shape"
4848
}
49+
variable "existent_oke_nodepool_id_for_autoscaler" {
50+
default = ""
51+
description = "Nodepool Id of the existent OKE to use with Cluster Autoscaler"
52+
}
4953
variable "image_operating_system" {
5054
default = "Oracle Linux"
5155
description = "The OS/image installed on all nodes in the node pool."

0 commit comments

Comments
 (0)