ovh.IpLoadBalancing.HttpFarmServer
Creates a backend server entry linked to HTTP loadbalancing group (farm)
Example Usage
using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var lb = Ovh.IpLoadBalancing.GetIpLoadBalancing.Invoke(new()
{
ServiceName = "ip-1.2.3.4",
State = "ok",
});
var farmname = new Ovh.IpLoadBalancing.HttpFarm("farmname", new()
{
Port = 8080,
ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.Id),
Zone = "all",
});
var backend = new Ovh.IpLoadBalancing.HttpFarmServer("backend", new()
{
Address = "4.5.6.7",
Backup = true,
DisplayName = "mybackend",
FarmId = farmname.Id,
Port = 80,
Probe = true,
ProxyProtocolVersion = "v2",
ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.Id),
Ssl = false,
Status = "active",
Weight = 2,
});
});
package main
import (
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/IpLoadBalancing"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
lb, err := IpLoadBalancing.GetIpLoadBalancing(ctx, &iploadbalancing.GetIpLoadBalancingArgs{
ServiceName: pulumi.StringRef("ip-1.2.3.4"),
State: pulumi.StringRef("ok"),
}, nil)
if err != nil {
return err
}
farmname, err := IpLoadBalancing.NewHttpFarm(ctx, "farmname", &IpLoadBalancing.HttpFarmArgs{
Port: pulumi.Int(8080),
ServiceName: *pulumi.String(lb.Id),
Zone: pulumi.String("all"),
})
if err != nil {
return err
}
_, err = IpLoadBalancing.NewHttpFarmServer(ctx, "backend", &IpLoadBalancing.HttpFarmServerArgs{
Address: pulumi.String("4.5.6.7"),
Backup: pulumi.Bool(true),
DisplayName: pulumi.String("mybackend"),
FarmId: farmname.ID(),
Port: pulumi.Int(80),
Probe: pulumi.Bool(true),
ProxyProtocolVersion: pulumi.String("v2"),
ServiceName: *pulumi.String(lb.Id),
Ssl: pulumi.Bool(false),
Status: pulumi.String("active"),
Weight: pulumi.Int(2),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.IpLoadBalancing.IpLoadBalancingFunctions;
import com.pulumi.ovh.IpLoadBalancing.inputs.GetIpLoadBalancingArgs;
import com.pulumi.ovh.IpLoadBalancing.HttpFarm;
import com.pulumi.ovh.IpLoadBalancing.HttpFarmArgs;
import com.pulumi.ovh.IpLoadBalancing.HttpFarmServer;
import com.pulumi.ovh.IpLoadBalancing.HttpFarmServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var lb = IpLoadBalancingFunctions.getIpLoadBalancing(GetIpLoadBalancingArgs.builder()
.serviceName("ip-1.2.3.4")
.state("ok")
.build());
var farmname = new HttpFarm("farmname", HttpFarmArgs.builder()
.port(8080)
.serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.id()))
.zone("all")
.build());
var backend = new HttpFarmServer("backend", HttpFarmServerArgs.builder()
.address("4.5.6.7")
.backup(true)
.displayName("mybackend")
.farmId(farmname.id())
.port(80)
.probe(true)
.proxyProtocolVersion("v2")
.serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.id()))
.ssl(false)
.status("active")
.weight(2)
.build());
}
}
import pulumi
import lbrlabs_pulumi_ovh as ovh
import pulumi_ovh as ovh
lb = ovh.IpLoadBalancing.get_ip_load_balancing(service_name="ip-1.2.3.4",
state="ok")
farmname = ovh.ip_load_balancing.HttpFarm("farmname",
port=8080,
service_name=lb.id,
zone="all")
backend = ovh.ip_load_balancing.HttpFarmServer("backend",
address="4.5.6.7",
backup=True,
display_name="mybackend",
farm_id=farmname.id,
port=80,
probe=True,
proxy_protocol_version="v2",
service_name=lb.id,
ssl=False,
status="active",
weight=2)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@lbrlabs/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const lb = ovh.IpLoadBalancing.getIpLoadBalancing({
serviceName: "ip-1.2.3.4",
state: "ok",
});
const farmname = new ovh.iploadbalancing.HttpFarm("farmname", {
port: 8080,
serviceName: lb.then(lb => lb.id),
zone: "all",
});
const backend = new ovh.iploadbalancing.HttpFarmServer("backend", {
address: "4.5.6.7",
backup: true,
displayName: "mybackend",
farmId: farmname.id,
port: 80,
probe: true,
proxyProtocolVersion: "v2",
serviceName: lb.then(lb => lb.id),
ssl: false,
status: "active",
weight: 2,
});
resources:
farmname:
type: ovh:IpLoadBalancing:HttpFarm
properties:
port: 8080
serviceName: ${lb.id}
zone: all
backend:
type: ovh:IpLoadBalancing:HttpFarmServer
properties:
address: 4.5.6.7
backup: true
displayName: mybackend
farmId: ${farmname.id}
port: 80
probe: true
proxyProtocolVersion: v2
serviceName: ${lb.id}
ssl: false
status: active
weight: 2
variables:
lb:
fn::invoke:
Function: ovh:IpLoadBalancing:getIpLoadBalancing
Arguments:
serviceName: ip-1.2.3.4
state: ok
Create HttpFarmServer Resource
new HttpFarmServer(name: string, args: HttpFarmServerArgs, opts?: CustomResourceOptions);
@overload
def HttpFarmServer(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
backup: Optional[bool] = None,
chain: Optional[str] = None,
display_name: Optional[str] = None,
farm_id: Optional[int] = None,
on_marked_down: Optional[str] = None,
port: Optional[int] = None,
probe: Optional[bool] = None,
proxy_protocol_version: Optional[str] = None,
service_name: Optional[str] = None,
ssl: Optional[bool] = None,
status: Optional[str] = None,
weight: Optional[int] = None)
@overload
def HttpFarmServer(resource_name: str,
args: HttpFarmServerArgs,
opts: Optional[ResourceOptions] = None)
func NewHttpFarmServer(ctx *Context, name string, args HttpFarmServerArgs, opts ...ResourceOption) (*HttpFarmServer, error)
public HttpFarmServer(string name, HttpFarmServerArgs args, CustomResourceOptions? opts = null)
public HttpFarmServer(String name, HttpFarmServerArgs args)
public HttpFarmServer(String name, HttpFarmServerArgs args, CustomResourceOptions options)
type: ovh:IpLoadBalancing:HttpFarmServer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpFarmServerArgs
- 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 HttpFarmServerArgs
- 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 HttpFarmServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpFarmServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HttpFarmServerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
HttpFarmServer 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 HttpFarmServer resource accepts the following input properties:
- Address string
Address of the backend server (IP from either internal or OVHcloud network)
- Farm
Id int ID of the farm this server is attached to
- Service
Name string The internal name of your IP load balancing
- Status string
backend status -
active
orinactive
- Backup bool
is it a backup server used in case of failure of all the non-backup backends
- Chain string
- Display
Name string Label for the server
- On
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- Port int
Port that backend will respond on
- Probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- Proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- Ssl bool
is the connection ciphered with SSL (TLS)
- Weight int
used in loadbalancing algorithm
- Address string
Address of the backend server (IP from either internal or OVHcloud network)
- Farm
Id int ID of the farm this server is attached to
- Service
Name string The internal name of your IP load balancing
- Status string
backend status -
active
orinactive
- Backup bool
is it a backup server used in case of failure of all the non-backup backends
- Chain string
- Display
Name string Label for the server
- On
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- Port int
Port that backend will respond on
- Probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- Proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- Ssl bool
is the connection ciphered with SSL (TLS)
- Weight int
used in loadbalancing algorithm
- address String
Address of the backend server (IP from either internal or OVHcloud network)
- farm
Id Integer ID of the farm this server is attached to
- service
Name String The internal name of your IP load balancing
- status String
backend status -
active
orinactive
- backup Boolean
is it a backup server used in case of failure of all the non-backup backends
- chain String
- display
Name String Label for the server
- on
Marked StringDown enable action when backend marked down. (
shutdown-sessions
)- port Integer
Port that backend will respond on
- probe Boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol StringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- ssl Boolean
is the connection ciphered with SSL (TLS)
- weight Integer
used in loadbalancing algorithm
- address string
Address of the backend server (IP from either internal or OVHcloud network)
- farm
Id number ID of the farm this server is attached to
- service
Name string The internal name of your IP load balancing
- status string
backend status -
active
orinactive
- backup boolean
is it a backup server used in case of failure of all the non-backup backends
- chain string
- display
Name string Label for the server
- on
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- port number
Port that backend will respond on
- probe boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- ssl boolean
is the connection ciphered with SSL (TLS)
- weight number
used in loadbalancing algorithm
- address str
Address of the backend server (IP from either internal or OVHcloud network)
- farm_
id int ID of the farm this server is attached to
- service_
name str The internal name of your IP load balancing
- status str
backend status -
active
orinactive
- backup bool
is it a backup server used in case of failure of all the non-backup backends
- chain str
- display_
name str Label for the server
- on_
marked_ strdown enable action when backend marked down. (
shutdown-sessions
)- port int
Port that backend will respond on
- probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy_
protocol_ strversion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- ssl bool
is the connection ciphered with SSL (TLS)
- weight int
used in loadbalancing algorithm
- address String
Address of the backend server (IP from either internal or OVHcloud network)
- farm
Id Number ID of the farm this server is attached to
- service
Name String The internal name of your IP load balancing
- status String
backend status -
active
orinactive
- backup Boolean
is it a backup server used in case of failure of all the non-backup backends
- chain String
- display
Name String Label for the server
- on
Marked StringDown enable action when backend marked down. (
shutdown-sessions
)- port Number
Port that backend will respond on
- probe Boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol StringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- ssl Boolean
is the connection ciphered with SSL (TLS)
- weight Number
used in loadbalancing algorithm
Outputs
All input properties are implicitly available as output properties. Additionally, the HttpFarmServer resource produces the following output properties:
- string
Value of the stickiness cookie used for this backend.
- Id string
The provider-assigned unique ID for this managed resource.
- string
Value of the stickiness cookie used for this backend.
- Id string
The provider-assigned unique ID for this managed resource.
- String
Value of the stickiness cookie used for this backend.
- id String
The provider-assigned unique ID for this managed resource.
- string
Value of the stickiness cookie used for this backend.
- id string
The provider-assigned unique ID for this managed resource.
- str
Value of the stickiness cookie used for this backend.
- id str
The provider-assigned unique ID for this managed resource.
- String
Value of the stickiness cookie used for this backend.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing HttpFarmServer Resource
Get an existing HttpFarmServer 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?: HttpFarmServerState, opts?: CustomResourceOptions): HttpFarmServer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
backup: Optional[bool] = None,
chain: Optional[str] = None,
cookie: Optional[str] = None,
display_name: Optional[str] = None,
farm_id: Optional[int] = None,
on_marked_down: Optional[str] = None,
port: Optional[int] = None,
probe: Optional[bool] = None,
proxy_protocol_version: Optional[str] = None,
service_name: Optional[str] = None,
ssl: Optional[bool] = None,
status: Optional[str] = None,
weight: Optional[int] = None) -> HttpFarmServer
func GetHttpFarmServer(ctx *Context, name string, id IDInput, state *HttpFarmServerState, opts ...ResourceOption) (*HttpFarmServer, error)
public static HttpFarmServer Get(string name, Input<string> id, HttpFarmServerState? state, CustomResourceOptions? opts = null)
public static HttpFarmServer get(String name, Output<String> id, HttpFarmServerState 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.
- Address string
Address of the backend server (IP from either internal or OVHcloud network)
- Backup bool
is it a backup server used in case of failure of all the non-backup backends
- Chain string
- string
Value of the stickiness cookie used for this backend.
- Display
Name string Label for the server
- Farm
Id int ID of the farm this server is attached to
- On
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- Port int
Port that backend will respond on
- Probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- Proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- Service
Name string The internal name of your IP load balancing
- Ssl bool
is the connection ciphered with SSL (TLS)
- Status string
backend status -
active
orinactive
- Weight int
used in loadbalancing algorithm
- Address string
Address of the backend server (IP from either internal or OVHcloud network)
- Backup bool
is it a backup server used in case of failure of all the non-backup backends
- Chain string
- string
Value of the stickiness cookie used for this backend.
- Display
Name string Label for the server
- Farm
Id int ID of the farm this server is attached to
- On
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- Port int
Port that backend will respond on
- Probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- Proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- Service
Name string The internal name of your IP load balancing
- Ssl bool
is the connection ciphered with SSL (TLS)
- Status string
backend status -
active
orinactive
- Weight int
used in loadbalancing algorithm
- address String
Address of the backend server (IP from either internal or OVHcloud network)
- backup Boolean
is it a backup server used in case of failure of all the non-backup backends
- chain String
- String
Value of the stickiness cookie used for this backend.
- display
Name String Label for the server
- farm
Id Integer ID of the farm this server is attached to
- on
Marked StringDown enable action when backend marked down. (
shutdown-sessions
)- port Integer
Port that backend will respond on
- probe Boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol StringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- service
Name String The internal name of your IP load balancing
- ssl Boolean
is the connection ciphered with SSL (TLS)
- status String
backend status -
active
orinactive
- weight Integer
used in loadbalancing algorithm
- address string
Address of the backend server (IP from either internal or OVHcloud network)
- backup boolean
is it a backup server used in case of failure of all the non-backup backends
- chain string
- string
Value of the stickiness cookie used for this backend.
- display
Name string Label for the server
- farm
Id number ID of the farm this server is attached to
- on
Marked stringDown enable action when backend marked down. (
shutdown-sessions
)- port number
Port that backend will respond on
- probe boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol stringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- service
Name string The internal name of your IP load balancing
- ssl boolean
is the connection ciphered with SSL (TLS)
- status string
backend status -
active
orinactive
- weight number
used in loadbalancing algorithm
- address str
Address of the backend server (IP from either internal or OVHcloud network)
- backup bool
is it a backup server used in case of failure of all the non-backup backends
- chain str
- str
Value of the stickiness cookie used for this backend.
- display_
name str Label for the server
- farm_
id int ID of the farm this server is attached to
- on_
marked_ strdown enable action when backend marked down. (
shutdown-sessions
)- port int
Port that backend will respond on
- probe bool
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy_
protocol_ strversion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- service_
name str The internal name of your IP load balancing
- ssl bool
is the connection ciphered with SSL (TLS)
- status str
backend status -
active
orinactive
- weight int
used in loadbalancing algorithm
- address String
Address of the backend server (IP from either internal or OVHcloud network)
- backup Boolean
is it a backup server used in case of failure of all the non-backup backends
- chain String
- String
Value of the stickiness cookie used for this backend.
- display
Name String Label for the server
- farm
Id Number ID of the farm this server is attached to
- on
Marked StringDown enable action when backend marked down. (
shutdown-sessions
)- port Number
Port that backend will respond on
- probe Boolean
defines if backend will be probed to determine health and keep as active in farm if healthy
- proxy
Protocol StringVersion version of the PROXY protocol used to pass origin connection information from loadbalancer to receiving service (
v1
,v2
,v2-ssl
,v2-ssl-cn
)- service
Name String The internal name of your IP load balancing
- ssl Boolean
is the connection ciphered with SSL (TLS)
- status String
backend status -
active
orinactive
- weight Number
used in loadbalancing algorithm
Package Details
- Repository
- ovh lbrlabs/pulumi-ovh
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
ovh
Terraform Provider.