File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- data "oci_core_instances " "instances " {
2- compartment_id = var. compartment_id
1+ data "oci_containerengine_node_pool " "oke_node_pool " {
2+ node_pool_id = var. node_pool_id
33}
44
55resource "oci_network_load_balancer_network_load_balancer" "nlb" {
@@ -40,17 +40,17 @@ resource "oci_network_load_balancer_backend" "nlb_backend_http" {
4040 network_load_balancer_id = oci_network_load_balancer_network_load_balancer. nlb . id
4141 port = var. node_port_http
4242 depends_on = [oci_network_load_balancer_backend_set . nlb_backend_set_http ]
43- count = var . node_size
44- target_id = data. oci_core_instances . instances . instances [count . index ]. id
43+ count = length (data . oci_containerengine_node_pool . oke_node_pool . nodes )
44+ target_id = data. oci_containerengine_node_pool . oke_node_pool . nodes [count . index ]. id
4545}
4646
4747resource "oci_network_load_balancer_backend" "nlb_backend_https" {
4848 backend_set_name = oci_network_load_balancer_backend_set. nlb_backend_set_https . name
4949 network_load_balancer_id = oci_network_load_balancer_network_load_balancer. nlb . id
5050 port = var. node_port_https
5151 depends_on = [oci_network_load_balancer_backend_set . nlb_backend_set_https ]
52- count = var . node_size
53- target_id = data. oci_core_instances . instances . instances [count . index ]. id
52+ count = length (data . oci_containerengine_node_pool . oke_node_pool . nodes )
53+ target_id = data. oci_containerengine_node_pool . oke_node_pool . nodes [count . index ]. id
5454}
5555
5656resource "oci_network_load_balancer_listener" "nlb_listener_http" {
You can’t perform that action at this time.
0 commit comments