Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

Backend

This resource provides the Backend resource in Oracle Cloud Infrastructure Load Balancer service.

Adds a backend server to a backend set.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testBackend = new Oci.LoadBalancer.Backend("testBackend", new Oci.LoadBalancer.BackendArgs
        {
            BackendsetName = oci_load_balancer_backend_set.Test_backend_set.Name,
            IpAddress = @var.Backend_ip_address,
            LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
            Port = @var.Backend_port,
            Backup = @var.Backend_backup,
            Drain = @var.Backend_drain,
            Offline = @var.Backend_offline,
            Weight = @var.Backend_weight,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/LoadBalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := LoadBalancer.NewBackend(ctx, "testBackend", &LoadBalancer.BackendArgs{
			BackendsetName: pulumi.Any(oci_load_balancer_backend_set.Test_backend_set.Name),
			IpAddress:      pulumi.Any(_var.Backend_ip_address),
			LoadBalancerId: pulumi.Any(oci_load_balancer_load_balancer.Test_load_balancer.Id),
			Port:           pulumi.Any(_var.Backend_port),
			Backup:         pulumi.Any(_var.Backend_backup),
			Drain:          pulumi.Any(_var.Backend_drain),
			Offline:        pulumi.Any(_var.Backend_offline),
			Weight:         pulumi.Any(_var.Backend_weight),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_backend = oci.load_balancer.Backend("testBackend",
    backendset_name=oci_load_balancer_backend_set["test_backend_set"]["name"],
    ip_address=var["backend_ip_address"],
    load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"],
    port=var["backend_port"],
    backup=var["backend_backup"],
    drain=var["backend_drain"],
    offline=var["backend_offline"],
    weight=var["backend_weight"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testBackend = new oci.loadbalancer.Backend("testBackend", {
    backendsetName: oci_load_balancer_backend_set.test_backend_set.name,
    ipAddress: _var.backend_ip_address,
    loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
    port: _var.backend_port,
    backup: _var.backend_backup,
    drain: _var.backend_drain,
    offline: _var.backend_offline,
    weight: _var.backend_weight,
});

Coming soon!

Create a Backend Resource

new Backend(name: string, args: BackendArgs, opts?: CustomResourceOptions);
@overload
def Backend(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            backendset_name: Optional[str] = None,
            backup: Optional[bool] = None,
            drain: Optional[bool] = None,
            ip_address: Optional[str] = None,
            load_balancer_id: Optional[str] = None,
            offline: Optional[bool] = None,
            port: Optional[int] = None,
            weight: Optional[int] = None)
@overload
def Backend(resource_name: str,
            args: BackendArgs,
            opts: Optional[ResourceOptions] = None)
func NewBackend(ctx *Context, name string, args BackendArgs, opts ...ResourceOption) (*Backend, error)
public Backend(string name, BackendArgs args, CustomResourceOptions? opts = null)
public Backend(String name, BackendArgs args)
public Backend(String name, BackendArgs args, CustomResourceOptions options)
type: oci:LoadBalancer:Backend
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BackendArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BackendArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BackendArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BackendArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BackendArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Backend Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Backend resource accepts the following input properties:

BackendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

IpAddress string

The IP address of the backend server. Example: 10.0.0.3

LoadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

Port int

The communication port for the backend server. Example: 8080

Backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

Drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

Offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

Weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

BackendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

IpAddress string

The IP address of the backend server. Example: 10.0.0.3

LoadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

Port int

The communication port for the backend server. Example: 8080

Backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

Drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

Offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

Weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName String

The name of the backend set to add the backend server to. Example: example_backend_set

ipAddress String

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId String

The OCID of the load balancer associated with the backend set and servers.

port Integer

The communication port for the backend server. Example: 8080

backup Boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain Boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

offline Boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

weight Integer

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

ipAddress string

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

port number

The communication port for the backend server. Example: 8080

backup boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

offline boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

weight number

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendset_name str

The name of the backend set to add the backend server to. Example: example_backend_set

ip_address str

The IP address of the backend server. Example: 10.0.0.3

load_balancer_id str

The OCID of the load balancer associated with the backend set and servers.

port int

The communication port for the backend server. Example: 8080

backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName String

The name of the backend set to add the backend server to. Example: example_backend_set

ipAddress String

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId String

The OCID of the load balancer associated with the backend set and servers.

port Number

The communication port for the backend server. Example: 8080

backup Boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain Boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

offline Boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

weight Number

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

Outputs

All input properties are implicitly available as output properties. Additionally, the Backend resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

State string
Id string

The provider-assigned unique ID for this managed resource.

Name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

State string
id String

The provider-assigned unique ID for this managed resource.

name String

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

state String
id string

The provider-assigned unique ID for this managed resource.

name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

state string
id str

The provider-assigned unique ID for this managed resource.

name str

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

state str
id String

The provider-assigned unique ID for this managed resource.

name String

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

state String

Look up an Existing Backend Resource

Get an existing Backend resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BackendState, opts?: CustomResourceOptions): Backend
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backendset_name: Optional[str] = None,
        backup: Optional[bool] = None,
        drain: Optional[bool] = None,
        ip_address: Optional[str] = None,
        load_balancer_id: Optional[str] = None,
        name: Optional[str] = None,
        offline: Optional[bool] = None,
        port: Optional[int] = None,
        state: Optional[str] = None,
        weight: Optional[int] = None) -> Backend
func GetBackend(ctx *Context, name string, id IDInput, state *BackendState, opts ...ResourceOption) (*Backend, error)
public static Backend Get(string name, Input<string> id, BackendState? state, CustomResourceOptions? opts = null)
public static Backend get(String name, Output<String> id, BackendState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BackendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

Backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

Drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

IpAddress string

The IP address of the backend server. Example: 10.0.0.3

LoadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

Name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

Offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

Port int

The communication port for the backend server. Example: 8080

State string
Weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

BackendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

Backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

Drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

IpAddress string

The IP address of the backend server. Example: 10.0.0.3

LoadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

Name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

Offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

Port int

The communication port for the backend server. Example: 8080

State string
Weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName String

The name of the backend set to add the backend server to. Example: example_backend_set

backup Boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain Boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

ipAddress String

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId String

The OCID of the load balancer associated with the backend set and servers.

name String

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

offline Boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

port Integer

The communication port for the backend server. Example: 8080

state String
weight Integer

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName string

The name of the backend set to add the backend server to. Example: example_backend_set

backup boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

ipAddress string

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId string

The OCID of the load balancer associated with the backend set and servers.

name string

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

offline boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

port number

The communication port for the backend server. Example: 8080

state string
weight number

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendset_name str

The name of the backend set to add the backend server to. Example: example_backend_set

backup bool

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain bool

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

ip_address str

The IP address of the backend server. Example: 10.0.0.3

load_balancer_id str

The OCID of the load balancer associated with the backend set and servers.

name str

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

offline bool

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

port int

The communication port for the backend server. Example: 8080

state str
weight int

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

backendsetName String

The name of the backend set to add the backend server to. Example: example_backend_set

backup Boolean

(Updatable) Whether the load balancer should treat this server as a backup unit. If true, the load balancer forwards no ingress traffic to this backend server unless all other backend servers not marked as "backup" fail the health check policy.

drain Boolean

(Updatable) Whether the load balancer should drain this server. Servers marked "drain" receive no new incoming traffic. Example: false

ipAddress String

The IP address of the backend server. Example: 10.0.0.3

loadBalancerId String

The OCID of the load balancer associated with the backend set and servers.

name String

A read-only field showing the IP address and port that uniquely identify this backend server in the backend set. Example: 10.0.0.3:8080

offline Boolean

(Updatable) Whether the load balancer should treat this server as offline. Offline servers receive no incoming traffic. Example: false

port Number

The communication port for the backend server. Example: 8080

state String
weight Number

(Updatable) The 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 3 times the number of new connections as a server weighted '1'. For more information on load balancing policies, see How Load Balancing Policies Work. Example: 3

Import

Backends can be imported using the id, e.g.

 $ pulumi import oci:LoadBalancer/backend:Backend test_backend "loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}"

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.