Skip to content

Commit a486b05

Browse files
Ambar Modivarmax2511
authored andcommitted
Added - Support for NLB Support Multiple Protocol on Same Listener
1 parent 9fdcc56 commit a486b05

8 files changed

+34
-7
lines changed

examples/network_load_balancer/network_load_balancer_full/nlb_full.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,23 @@ resource "oci_network_load_balancer_backend_set" "nlb-bes2" {
229229
}
230230
}
231231

232+
resource "oci_network_load_balancer_backend_set" "nlb-bes3" {
233+
name = "nlb-bes3"
234+
network_load_balancer_id = oci_network_load_balancer_network_load_balancer.nlb1.id
235+
policy = "THREE_TUPLE"
236+
237+
health_checker {
238+
port = "443"
239+
protocol = "HTTPS"
240+
url_path = "/testPath"
241+
return_code = 200
242+
response_body_regex = "^(?i)(true)$"
243+
timeout_in_millis = 10000
244+
interval_in_millis = 10000
245+
retries = 3
246+
}
247+
}
248+
232249
resource "oci_network_load_balancer_listener" "nlb-listener1" {
233250
network_load_balancer_id = oci_network_load_balancer_network_load_balancer.nlb1.id
234251
name = "tcp_listener"
@@ -245,6 +262,14 @@ resource "oci_network_load_balancer_listener" "nlb-listener2" {
245262
protocol = "UDP"
246263
}
247264

265+
resource "oci_network_load_balancer_listener" "nlb-listener3" {
266+
network_load_balancer_id = oci_network_load_balancer_network_load_balancer.nlb1.id
267+
name = "tcp_and_udp_listener"
268+
default_backend_set_name = oci_network_load_balancer_backend_set.nlb-bes3.name
269+
port = 80
270+
protocol = "TCP_AND_UDP"
271+
}
272+
248273
resource "oci_network_load_balancer_backend" "nlb-be1" {
249274
network_load_balancer_id = oci_network_load_balancer_network_load_balancer.nlb1.id
250275
backend_set_name = oci_network_load_balancer_backend_set.nlb-bes1.name

website/docs/d/network_load_balancer_backend_health.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ data "oci_network_load_balancer_backend_health" "test_backend_health" {
2727

2828
The following arguments are supported:
2929

30-
* `backend_name` - (Required) The name of the backend server for which to retrieve the health status, specified as <ip>:<port> or as <ip> <OCID>:<port>. Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
30+
* `backend_name` - (Required) The name of the backend server to retrieve health status for. If the backend was created with an explicitly specified name, that name should be used here. If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as <ipAddress>:<port>. If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as <targetId>:<port>. Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
3131
* `backend_set_name` - (Required) The name of the backend set associated with the backend server for which to retrieve the health status. Example: `example_backend_set`
3232
* `network_load_balancer_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network load balancer to update.
3333

website/docs/d/network_load_balancer_backend_set.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following attributes are exported:
3737
* `backends` - Array of backends.
3838
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
3939
* `is_backup` - Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
40-
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
40+
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
4141
* `is_offline` - Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
4242
* `name` - A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`, or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443` or `10.0.0.3:0`
4343
* `port` - The communication port for the backend server. Example: `8080`

website/docs/d/network_load_balancer_backend_sets.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The following attributes are exported:
4141
* `backends` - Array of backends.
4242
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
4343
* `is_backup` - Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
44-
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
44+
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
4545
* `is_offline` - Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
4646
* `name` - A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`, or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443` or `10.0.0.3:0`
4747
* `port` - The communication port for the backend server. Example: `8080`

website/docs/d/network_load_balancer_backends.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following attributes are exported:
4242

4343
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
4444
* `is_backup` - Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
45-
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
45+
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
4646
* `is_offline` - Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
4747
* `name` - A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`, or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443` or `10.0.0.3:0`
4848
* `port` - The communication port for the backend server. Example: `8080`

website/docs/d/network_load_balancer_network_load_balancers_protocols.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ description: |-
1010
# Data Source: oci_network_load_balancer_network_load_balancers_protocols
1111
This data source provides the list of Network Load Balancers Protocols in Oracle Cloud Infrastructure Network Load Balancer service.
1212

13+
This API has been deprecated so it won't return the updated list of supported protocls.
1314
Lists all supported traffic protocols.
1415

16+
1517
## Example Usage
1618

1719
```hcl

website/docs/r/network_load_balancer_backend.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following arguments are supported:
3939
* `backend_set_name` - (Required) The name of the backend set to which to add the backend server. Example: `example_backend_set`
4040
* `ip_address` - (Optional) The IP address of the backend server. Example: `10.0.0.3`
4141
* `is_backup` - (Optional) (Updatable) Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
42-
* `is_drain` - (Optional) (Updatable) Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
42+
* `is_drain` - (Optional) (Updatable) Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
4343
* `is_offline` - (Optional) (Updatable) Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
4444
* `name` - (Optional) Optional unique name identifying the backend within the backend set. If not specified, then one will be generated. Example: `webServer1`
4545
* `network_load_balancer_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the network load balancer to update.
@@ -57,7 +57,7 @@ The following attributes are exported:
5757

5858
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
5959
* `is_backup` - Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
60-
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
60+
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
6161
* `is_offline` - Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
6262
* `name` - A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`, or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443` or `10.0.0.3:0`
6363
* `port` - The communication port for the backend server. Example: `8080`

website/docs/r/network_load_balancer_backend_set.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The following attributes are exported:
7575
* `backends` - Array of backends.
7676
* `ip_address` - The IP address of the backend server. Example: `10.0.0.3`
7777
* `is_backup` - Whether the network load balancer should treat this server as a backup unit. If `true`, then the network load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "isBackup" fail the health check policy. Example: `false`
78-
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
78+
* `is_drain` - Whether the network load balancer should drain this server. Servers marked "isDrain" receive no incoming traffic. Example: `false`
7979
* `is_offline` - Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: `false`
8080
* `name` - A read-only field showing the IP address/IP OCID and port that uniquely identify this backend server in the backend set. Example: `10.0.0.3:8080`, or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:443` or `10.0.0.3:0`
8181
* `port` - The communication port for the backend server. Example: `8080`

0 commit comments

Comments
 (0)