Deploys an OCI Application Load Balancer (Layer 7) with backend sets, listeners, SSL certificates, virtual hostnames, and rule sets as a single atomic deployment unit. Supports HTTP, HTTP/2, TCP, and gRPC protocols with flexible bandwidth, cookie-based session persistence, health checking, and rule-based request/response manipulation including HTTP redirects, header injection, and access control.
What Gets Created
When you deploy an OciApplicationLoadBalancer resource, OpenMCF provisions:
Application Load Balancer — an oci_load_balancer_load_balancer resource in the specified compartment with the configured shape, bandwidth, and subnet placement. Standard OpenMCF freeform tags are applied for resource tracking.
Backend Sets — one or more oci_load_balancer_backend_set resources defining load balancing policy, health checking, and optional SSL and session persistence configuration for each group of backends.
Backends — oci_load_balancer_backend resources for each backend server defined within a backend set. Created only when backends are specified in the backend set configuration.
Listeners — one or more oci_load_balancer_listener resources defining the ports, protocols, and routing to backend sets. Listeners are created after all other sub-resources to ensure correct dependency ordering.
Certificates — oci_load_balancer_certificate resources for TLS/SSL termination. Created only when certificates are specified.
Hostnames — oci_load_balancer_hostname resources for virtual host-based routing. Created only when hostnames are specified.
Rule Sets — oci_load_balancer_rule_set resources for request/response manipulation including HTTP redirects, header injection, access control, and connection limits. Created only when rule sets are specified.
Prerequisites
OCI credentials configured via environment variables or OpenMCF provider config (API Key, Instance Principal, Security Token, Resource Principal, or OKE Workload Identity)
A compartment OCID where the load balancer will be created — literal value or reference to an OciCompartment resource
At least one subnet OCID for load balancer placement — literal value or reference to an OciSubnet resource. For high availability, provide subnets in two different availability domains
Backend server IP addresses and ports for at least one backend set (backends can be added later, but a load balancer without backends does not route traffic)
PEM-encoded TLS certificates if configuring HTTPS listeners or backend SSL
This creates a public flexible-shape load balancer with 10–100 Mbps bandwidth, one backend set using round-robin distribution with HTTP health checks on /health, two backend servers on port 8080, and one HTTP listener on port 80. The load balancer OCID and assigned IP addresses are exported as stack outputs.
Configuration Reference
Required Fields
Field
Type
Description
Validation
compartmentId
StringValueOrRef
OCID of the compartment where the load balancer will be created. Can reference an OciCompartment resource via valueFrom.
Required
shape
string
Load balancer shape. Use "flexible" for configurable bandwidth (recommended). Deprecated fixed shapes ("100Mbps", "400Mbps", "8000Mbps") are accepted for backward compatibility.
Minimum 1 character
subnetIds
StringValueOrRef[]
OCIDs of subnets where the load balancer will be provisioned. For regional load balancers (recommended), provide subnets in two different availability domains for high availability. Changing subnets after creation forces recreation. Can reference OciSubnet resources via valueFrom.
Minimum 1 item
backendSets
BackendSet[]
Backend sets defining groups of backend servers with load balancing policies and health checking. Each listener routes traffic to exactly one default backend set. See backendSet fields.
Minimum 1 item
listeners
Listener[]
Listeners defining ports and protocols on which the load balancer accepts client connections. See listener fields.
Minimum 1 item
Optional Fields
Field
Type
Default
Description
displayName
string
metadata.name
Human-readable name for the load balancer shown in the OCI Console.
shapeDetails
ShapeDetails
—
Bandwidth configuration for flexible-shape load balancers. Required when shape is "flexible". Ignored for fixed shapes. See shapeDetails fields.
isPrivate
bool
false
When true, creates a private load balancer not accessible from the public internet. Private load balancers receive only private IP addresses. Changing after creation forces recreation.
networkSecurityGroupIds
StringValueOrRef[]
—
OCIDs of network security groups applied to the load balancer. Can reference OciSecurityGroup resources via valueFrom.
isDeleteProtectionEnabled
bool
false
When true, prevents accidental deletion. Must be explicitly disabled before the load balancer can be deleted.
ipMode
string
"IPV4"
IP version mode. Accepted values: "IPV4", "IPV6".
reservedIps
ReservedIp[]
—
Pre-created reserved public IPs to assign. When omitted, OCI assigns ephemeral public IPs. See reservedIp fields.
isRequestIdEnabled
bool
false
When true, the load balancer adds a request ID header to each request for tracing and debugging.
requestIdHeader
string
OCI default
Custom header name for the request ID. Only effective when isRequestIdEnabled is true.
certificates
Certificate[]
—
TLS/SSL certificates for HTTPS termination. Referenced by name in listener and backend set SSL configurations. See certificate fields.
hostnames
Hostname[]
—
Virtual hostnames for host-based routing. Referenced by name in listener configurations. See hostname fields.
ruleSets
RuleSet[]
—
Rule sets for request/response manipulation. Referenced by name in listener configurations. See ruleSet fields.
shapeDetails Fields
Field
Type
Description
Validation
minimumBandwidthInMbps
int32
Minimum bandwidth in Mbps. The load balancer always provides at least this bandwidth.
10–8000
maximumBandwidthInMbps
int32
Maximum bandwidth in Mbps. The load balancer can burst up to this bandwidth. Must be >= minimumBandwidthInMbps.
10–8000
reservedIp Fields
Field
Type
Description
Validation
id
string
OCID of the reserved public IP to assign to the load balancer.
Minimum 1 character
backendSet Fields
Field
Type
Description
Validation
name
string
Unique name for this backend set within the load balancer. Listeners reference backend sets by this name.
Health checker monitoring backend availability. The load balancer removes unhealthy backends from rotation until they pass again. See healthChecker fields.
Required
backends
Backend[]
Backend servers in this set. When omitted, the backend set is created without backends (useful when backends are added dynamically). See backend fields.
Optional
sslConfiguration
SslConfiguration
SSL configuration for encrypting traffic between the load balancer and backend servers (backend SSL / re-encryption). See sslConfiguration fields.
Optional
backendMaxConnections
int32
Maximum simultaneous connections per backend. When omitted, connections are unlimited.
Optional
lbCookieSessionPersistence
LbCookieSessionPersistenceConfig
Load-balancer-managed cookie persistence. The LB injects and tracks a cookie to pin clients to backends. Mutually exclusive with appCookieSessionPersistence. See lbCookieSessionPersistenceConfig fields.
Optional
appCookieSessionPersistence
SessionPersistenceConfig
Application-managed cookie persistence. The LB reads an existing application cookie for backend affinity. Mutually exclusive with lbCookieSessionPersistence. See sessionPersistenceConfig fields.
Optional
healthChecker Fields
Field
Type
Description
Validation
protocol
enum
Health check protocol. Values: http, tcp.
Required (cannot be unspecified)
port
int32
Port to probe. When omitted or 0, uses the backend's traffic port.
Optional
urlPath
string
URL path for HTTP health checks (e.g., "/health"). Required when protocol is http. Ignored for tcp.
Optional
returnCode
int32
Expected HTTP status code (e.g., 200). When omitted, any 2xx status is healthy.
Optional
responseBodyRegex
string
Regex pattern to match against the response body. When omitted, body content is not checked.
Optional
intervalMs
int32
Interval between health checks in milliseconds.
Default: 30000
timeoutInMillis
int32
Maximum wait time for a response in milliseconds.
Default: 3000
retries
int32
Consecutive failures before marking a backend unhealthy.
Default: 3
isForcePlainText
bool
When true, forces plain text health checks even when the backend set has SSL configured.
Optional
backend Fields
Field
Type
Description
Validation
ipAddress
string
IP address of the backend server.
Minimum 1 character
port
int32
Port on which the backend listens for traffic.
1–65535
weight
int32
Relative weight for traffic distribution. Higher weights receive proportionally more traffic.
Default: 1
backup
bool
When true, this backend only receives traffic when all non-backup backends are unhealthy.
Optional
drain
bool
When true, existing connections complete but no new connections are sent to this backend.
Optional
offline
bool
When true, the backend is taken offline. No traffic is sent to offline backends.
Optional
maxConnections
int32
Maximum simultaneous connections to this backend. When omitted, the backend set's backendMaxConnections applies.
Optional
sslConfiguration Fields
Used in both backend sets (backend-facing SSL / re-encryption) and listeners (client-facing SSL termination).
Field
Type
Description
certificateIds
string[]
OCIDs of OCI Certificate Service certificates. Preferred over certificateName for managed certificate lifecycle.
certificateName
string
Name of a certificate defined in this load balancer's certificates list.
cipherSuiteName
string
Cipher suite for SSL negotiation. Example: "oci-default-ssl-cipher-suite-v1".
protocols
string[]
TLS protocol versions to accept. Example: ["TLSv1.2", "TLSv1.3"].
serverOrderPreference
string
Cipher order preference. Values: "ENABLED" (server preference), "DISABLED" (client preference).
trustedCertificateAuthorityIds
string[]
OCIDs of trusted CA certificates for verifying backend server certificates (backend SSL) or client certificates (mutual TLS on listener).
verifyDepth
int32
Maximum certificate chain verification depth. Default: 5.
verifyPeerCertificate
bool
When true, verifies the peer's certificate. For backend SSL: verifies the backend server certificate. For listener SSL with mutual TLS: verifies the client certificate.
hasSessionResumption
bool
When true, enables TLS session resumption for improved performance. Only applicable in listener SSL context. Ignored for backend set SSL.
lbCookieSessionPersistenceConfig Fields
Field
Type
Description
cookieName
string
Cookie name. When omitted, OCI generates a default name.
disableFallback
bool
When true, clients without the cookie are rejected instead of being assigned to a new backend.
domain
string
Domain attribute for the Set-Cookie header. When omitted, applies to the request domain.
isHttpOnly
bool
When true, the cookie is marked HttpOnly (not accessible to JavaScript).
isSecure
bool
When true, the cookie is marked Secure (only sent over HTTPS).
maxAgeInSeconds
int32
Cookie lifetime in seconds. When omitted or 0, the cookie is a session cookie (expires when the browser closes).
path
string
Path attribute for the Set-Cookie header. Default: "/".
sessionPersistenceConfig Fields
Field
Type
Description
Validation
cookieName
string
Name of the application cookie used for session affinity.
Minimum 1 character
disableFallback
bool
When true, clients without the cookie are rejected instead of being assigned to a new backend.
Optional
listener Fields
Field
Type
Description
Validation
name
string
Unique name for this listener within the load balancer.
Names of hostname resources in this load balancer's hostnames list. When set, the listener only handles requests matching these hostnames (virtual host routing).
Optional
ruleSetNames
string[]
Names of rule set resources in this load balancer's ruleSets list. Rule sets are applied in the order specified.
Optional
routingPolicyName
string
Name of a routing policy for content-based routing. Routing policies are managed outside this component.
Optional
connectionConfiguration Fields
Field
Type
Description
idleTimeoutInSeconds
int64
Maximum idle time in seconds before the load balancer closes the connection. Applies to both client-side and backend-side connections.
backendTcpProxyProtocolVersion
int32
Proxy protocol version (1 or 2). When set, the load balancer prepends proxy protocol headers to backend connections, allowing backends to see the original client IP.
certificate Fields
Field
Type
Description
Validation
certificateName
string
Unique name for this certificate within the load balancer. SSL configurations reference certificates by this name.
Minimum 1 character
caCertificate
string
PEM-encoded CA certificate chain.
Optional
publicCertificate
string
PEM-encoded public certificate.
Optional
privateKey
string
PEM-encoded private key. Sensitive.
Optional
passphrase
string
Passphrase for an encrypted private key. Sensitive.
Optional
hostname Fields
Field
Type
Description
Validation
name
string
Unique name for this hostname resource within the load balancer. Listeners reference hostnames by this name.
Minimum 1 character
hostname
string
Fully qualified domain name (FQDN) to match against the HTTP Host header. Example: "app.example.com".
Minimum 1 character
ruleSet Fields
Field
Type
Description
Validation
name
string
Unique name for this rule set within the load balancer. Listeners reference rule sets by this name.
A production load balancer with HTTPS, HTTP-to-HTTPS redirect, security headers, LB-managed session persistence, delete protection, request tracing, NSGs, and infrastructure references via valueFrom:
After deployment, the following outputs are available in status.outputs:
Output
Type
Description
load_balancer_id
string
OCID of the load balancer.
ip_addresses
string
Comma-separated IP addresses assigned to the load balancer. For public load balancers, includes the public IP(s). For private load balancers, includes the private IP(s).
Related Components
OciCompartment — provides the compartment referenced by compartmentId via valueFrom
OciSubnet — provides subnets referenced by subnetIds via valueFrom
OciSecurityGroup — manages network security rules applied to the load balancer (networkSecurityGroupIds) via valueFrom
OciNetworkLoadBalancer — Layer 4 (TCP/UDP) load balancing with source IP preservation, for workloads that do not need HTTP-level features
Next article
OCI Autonomous Database
OCI Autonomous Database Deploys an Oracle Cloud Infrastructure Autonomous Database — a fully managed, self-driving database service supporting OLTP (ATP), data warehouse (ADW), JSON (AJD), APEX, and lakehouse workloads. The component handles compute and storage sizing, networking, encryption, Data Guard, and backup retention through a single manifest. What Gets Created When you deploy an OciAutonomousDatabase resource, OpenMCF provisions: Autonomous Database — an ocidatabaseautonomousdatabase...