oci_network_load_balancer_backend
This resource provides the Backend resource in Oracle Cloud Infrastructure Network Load Balancer service.
Adds a backend server to a backend set.
Example Usage
resource "oci_network_load_balancer_backend" "test_backend" {
#Required
backend_set_name = oci_network_load_balancer_backend_set.test_backend_set.name
network_load_balancer_id = oci_network_load_balancer_network_load_balancer.test_network_load_balancer.id
port = var.backend_port
#Optional
ip_address = var.backend_ip_address
is_backup = var.backend_is_backup
is_drain = var.backend_is_drain
is_offline = var.backend_is_offline
name = var.backend_name
target_id = oci_cloud_guard_target.test_target.id
weight = var.backend_weight
}
Argument Reference
The following arguments are supported:
backend_set_name- (Required) The name of the backend set to which to add the backend server. Example:example_backend_setip_address- (Optional) The IP address of the backend server. Example:10.0.0.3is_backup- (Optional) (Updatable) Whether the network load balancer should treat this server as a backup unit. Iftrue, 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:falseis_drain- (Optional) (Updatable) Whether the network load balancer should drain this server. Servers marked “isDrain” receive no incoming traffic. Example:falseis_offline- (Optional) (Updatable) Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example:falsename- (Optional) Optional unique name identifying the backend within the backend set. If not specified, then one will be generated. Example:webServer1network_load_balancer_id- (Required) The OCID of the network load balancer to update.port- (Required) The communication port for the backend server. Example:8080target_id- (Optional) The IP OCID/Instance OCID associated with the backend server. Example:ocid1.privateip..oc1.<var><unique_ID></var>weight- (Optional) (Updatable) The network load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted ‘3’ receives three times the number of new connections as a server weighted ‘1’. For more information about network load balancer policies, see Network Load Balancer Policies. Example:3
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
ip_address- The IP address of the backend server. Example:10.0.0.3is_backup- Whether the network load balancer should treat this server as a backup unit. Iftrue, 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:falseis_drain- Whether the network load balancer should drain this server. Servers marked “isDrain” receive no incoming traffic. Example:falseis_offline- Whether the network load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example:falsename- 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, orocid1.privateip..oc1.<var><unique_ID></var>:443or10.0.0.3:0port- The communication port for the backend server. Example:8080target_id- The IP OCID/Instance OCID associated with the backend server. Example:ocid1.privateip..oc1.<var><unique_ID></var>weight- The network load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger proportion of incoming traffic. For example, a server weighted ‘3’ receives three times the number of new connections as a server weighted ‘1’. For more information about network load balancing policies, see Network Load Balancer Policies. Example:3
Timeouts
The timeouts block allows you to specify timeouts for certain operations:
* create - (Defaults to 20 minutes), when creating the Backend
* update - (Defaults to 20 minutes), when updating the Backend
* delete - (Defaults to 20 minutes), when destroying the Backend
Import
Backends can be imported using the id, e.g.
$ terraform import oci_network_load_balancer_backend.test_backend "networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends/{backendName}"