ovh.IpLoadBalancing.TcpFarm
Explore with Pulumi AI
Creates a backend server group (farm) to be used by loadbalancing frontend(s)
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/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.TcpFarm("farmname", {
displayName: "ingress-8080-gra",
serviceName: lb.then(lb => lb.serviceName),
zone: "GRA",
});
import pulumi
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.TcpFarm("farmname",
display_name="ingress-8080-gra",
service_name=lb.service_name,
zone="GRA")
package main
import (
"github.com/ovh/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
}
_, err = IpLoadBalancing.NewTcpFarm(ctx, "farmname", &IpLoadBalancing.TcpFarmArgs{
DisplayName: pulumi.String("ingress-8080-gra"),
ServiceName: pulumi.String(lb.ServiceName),
Zone: pulumi.String("GRA"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
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.TcpFarm("farmname", new()
{
DisplayName = "ingress-8080-gra",
ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
Zone = "GRA",
});
});
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.TcpFarm;
import com.pulumi.ovh.IpLoadBalancing.TcpFarmArgs;
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 TcpFarm("farmname", TcpFarmArgs.builder()
.displayName("ingress-8080-gra")
.serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
.zone("GRA")
.build());
}
}
resources:
farmname:
type: ovh:IpLoadBalancing:TcpFarm
properties:
displayName: ingress-8080-gra
serviceName: ${lb.serviceName}
zone: GRA
variables:
lb:
fn::invoke:
Function: ovh:IpLoadBalancing:getIpLoadBalancing
Arguments:
serviceName: ip-1.2.3.4
state: ok
Create TcpFarm Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcpFarm(name: string, args: TcpFarmArgs, opts?: CustomResourceOptions);
@overload
def TcpFarm(resource_name: str,
args: TcpFarmArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcpFarm(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_name: Optional[str] = None,
zone: Optional[str] = None,
balance: Optional[str] = None,
display_name: Optional[str] = None,
port: Optional[int] = None,
probe: Optional[_iploadbalancing.TcpFarmProbeArgs] = None,
stickiness: Optional[str] = None,
vrack_network_id: Optional[int] = None)
func NewTcpFarm(ctx *Context, name string, args TcpFarmArgs, opts ...ResourceOption) (*TcpFarm, error)
public TcpFarm(string name, TcpFarmArgs args, CustomResourceOptions? opts = null)
public TcpFarm(String name, TcpFarmArgs args)
public TcpFarm(String name, TcpFarmArgs args, CustomResourceOptions options)
type: ovh:IpLoadBalancing:TcpFarm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TcpFarmArgs
- 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 TcpFarmArgs
- 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 TcpFarmArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcpFarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcpFarmArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var tcpFarmResource = new Ovh.IpLoadBalancing.TcpFarm("tcpFarmResource", new()
{
ServiceName = "string",
Zone = "string",
Balance = "string",
DisplayName = "string",
Port = 0,
Probe = new Ovh.IpLoadBalancing.Inputs.TcpFarmProbeArgs
{
Type = "string",
ForceSsl = false,
Interval = 0,
Match = "string",
Method = "string",
Negate = false,
Pattern = "string",
Port = 0,
Url = "string",
},
Stickiness = "string",
VrackNetworkId = 0,
});
example, err := IpLoadBalancing.NewTcpFarm(ctx, "tcpFarmResource", &IpLoadBalancing.TcpFarmArgs{
ServiceName: pulumi.String("string"),
Zone: pulumi.String("string"),
Balance: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Port: pulumi.Int(0),
Probe: &iploadbalancing.TcpFarmProbeArgs{
Type: pulumi.String("string"),
ForceSsl: pulumi.Bool(false),
Interval: pulumi.Int(0),
Match: pulumi.String("string"),
Method: pulumi.String("string"),
Negate: pulumi.Bool(false),
Pattern: pulumi.String("string"),
Port: pulumi.Int(0),
Url: pulumi.String("string"),
},
Stickiness: pulumi.String("string"),
VrackNetworkId: pulumi.Int(0),
})
var tcpFarmResource = new TcpFarm("tcpFarmResource", TcpFarmArgs.builder()
.serviceName("string")
.zone("string")
.balance("string")
.displayName("string")
.port(0)
.probe(TcpFarmProbeArgs.builder()
.type("string")
.forceSsl(false)
.interval(0)
.match("string")
.method("string")
.negate(false)
.pattern("string")
.port(0)
.url("string")
.build())
.stickiness("string")
.vrackNetworkId(0)
.build());
tcp_farm_resource = ovh.ip_load_balancing.TcpFarm("tcpFarmResource",
service_name="string",
zone="string",
balance="string",
display_name="string",
port=0,
probe={
"type": "string",
"force_ssl": False,
"interval": 0,
"match": "string",
"method": "string",
"negate": False,
"pattern": "string",
"port": 0,
"url": "string",
},
stickiness="string",
vrack_network_id=0)
const tcpFarmResource = new ovh.iploadbalancing.TcpFarm("tcpFarmResource", {
serviceName: "string",
zone: "string",
balance: "string",
displayName: "string",
port: 0,
probe: {
type: "string",
forceSsl: false,
interval: 0,
match: "string",
method: "string",
negate: false,
pattern: "string",
port: 0,
url: "string",
},
stickiness: "string",
vrackNetworkId: 0,
});
type: ovh:IpLoadBalancing:TcpFarm
properties:
balance: string
displayName: string
port: 0
probe:
forceSsl: false
interval: 0
match: string
method: string
negate: false
pattern: string
port: 0
type: string
url: string
serviceName: string
stickiness: string
vrackNetworkId: 0
zone: string
TcpFarm Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TcpFarm resource accepts the following input properties:
- Service
Name string - The internal name of your IP load balancing
- Zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - Balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - Display
Name string - Readable label for loadbalancer farm
- Port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- Probe
Tcp
Farm Probe - define a backend healthcheck probe
- Stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - Vrack
Network intId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- Service
Name string - The internal name of your IP load balancing
- Zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - Balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - Display
Name string - Readable label for loadbalancer farm
- Port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- Probe
Tcp
Farm Probe Args - define a backend healthcheck probe
- Stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - Vrack
Network intId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- service
Name String - The internal name of your IP load balancing
- zone String
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - balance String
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name String - Readable label for loadbalancer farm
- port Integer
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
Tcp
Farm Probe - define a backend healthcheck probe
- stickiness String
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network IntegerId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- service
Name string - The internal name of your IP load balancing
- zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name string - Readable label for loadbalancer farm
- port number
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
Tcp
Farm Probe - define a backend healthcheck probe
- stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network numberId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- service_
name str - The internal name of your IP load balancing
- zone str
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - balance str
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display_
name str - Readable label for loadbalancer farm
- port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
iploadbalancing.
Tcp Farm Probe Args - define a backend healthcheck probe
- stickiness str
- Stickiness type. No stickiness if null (
sourceIp
) - vrack_
network_ intid - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- service
Name String - The internal name of your IP load balancing
- zone String
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
) - balance String
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name String - Readable label for loadbalancer farm
- port Number
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe Property Map
- define a backend healthcheck probe
- stickiness String
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network NumberId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
Outputs
All input properties are implicitly available as output properties. Additionally, the TcpFarm resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TcpFarm Resource
Get an existing TcpFarm 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?: TcpFarmState, opts?: CustomResourceOptions): TcpFarm
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
balance: Optional[str] = None,
display_name: Optional[str] = None,
port: Optional[int] = None,
probe: Optional[_iploadbalancing.TcpFarmProbeArgs] = None,
service_name: Optional[str] = None,
stickiness: Optional[str] = None,
vrack_network_id: Optional[int] = None,
zone: Optional[str] = None) -> TcpFarm
func GetTcpFarm(ctx *Context, name string, id IDInput, state *TcpFarmState, opts ...ResourceOption) (*TcpFarm, error)
public static TcpFarm Get(string name, Input<string> id, TcpFarmState? state, CustomResourceOptions? opts = null)
public static TcpFarm get(String name, Output<String> id, TcpFarmState 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.
- Balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - Display
Name string - Readable label for loadbalancer farm
- Port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- Probe
Tcp
Farm Probe - define a backend healthcheck probe
- Service
Name string - The internal name of your IP load balancing
- Stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - Vrack
Network intId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- Zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
- Balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - Display
Name string - Readable label for loadbalancer farm
- Port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- Probe
Tcp
Farm Probe Args - define a backend healthcheck probe
- Service
Name string - The internal name of your IP load balancing
- Stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - Vrack
Network intId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- Zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
- balance String
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name String - Readable label for loadbalancer farm
- port Integer
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
Tcp
Farm Probe - define a backend healthcheck probe
- service
Name String - The internal name of your IP load balancing
- stickiness String
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network IntegerId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- zone String
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
- balance string
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name string - Readable label for loadbalancer farm
- port number
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
Tcp
Farm Probe - define a backend healthcheck probe
- service
Name string - The internal name of your IP load balancing
- stickiness string
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network numberId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- zone string
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
- balance str
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display_
name str - Readable label for loadbalancer farm
- port int
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe
iploadbalancing.
Tcp Farm Probe Args - define a backend healthcheck probe
- service_
name str - The internal name of your IP load balancing
- stickiness str
- Stickiness type. No stickiness if null (
sourceIp
) - vrack_
network_ intid - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- zone str
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
- balance String
- Load balancing algorithm.
roundrobin
if null (first
,leastconn
,roundrobin
,source
) - display
Name String - Readable label for loadbalancer farm
- port Number
- Port attached to your farm ([1..49151]). Inherited from frontend if null
- probe Property Map
- define a backend healthcheck probe
- service
Name String - The internal name of your IP load balancing
- stickiness String
- Stickiness type. No stickiness if null (
sourceIp
) - vrack
Network NumberId - Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- zone String
- Zone where the farm will be defined (ie.
GRA
,BHS
also supportsALL
)
Supporting Types
TcpFarmProbe, TcpFarmProbeArgs
- Type string
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- Force
Ssl bool - Force use of SSL (TLS)
- Interval int
- probe interval, Value between 30 and 3600 seconds, default 30
- Match string
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - Method string
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - Negate bool
- Negate probe result
- Pattern string
- Pattern to match against
match
- Port int
- Port for backends to receive traffic on.
- Url string
- URL for HTTP probe type.
- Type string
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- Force
Ssl bool - Force use of SSL (TLS)
- Interval int
- probe interval, Value between 30 and 3600 seconds, default 30
- Match string
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - Method string
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - Negate bool
- Negate probe result
- Pattern string
- Pattern to match against
match
- Port int
- Port for backends to receive traffic on.
- Url string
- URL for HTTP probe type.
- type String
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- force
Ssl Boolean - Force use of SSL (TLS)
- interval Integer
- probe interval, Value between 30 and 3600 seconds, default 30
- match String
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - method String
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - negate Boolean
- Negate probe result
- pattern String
- Pattern to match against
match
- port Integer
- Port for backends to receive traffic on.
- url String
- URL for HTTP probe type.
- type string
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- force
Ssl boolean - Force use of SSL (TLS)
- interval number
- probe interval, Value between 30 and 3600 seconds, default 30
- match string
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - method string
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - negate boolean
- Negate probe result
- pattern string
- Pattern to match against
match
- port number
- Port for backends to receive traffic on.
- url string
- URL for HTTP probe type.
- type str
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- force_
ssl bool - Force use of SSL (TLS)
- interval int
- probe interval, Value between 30 and 3600 seconds, default 30
- match str
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - method str
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - negate bool
- Negate probe result
- pattern str
- Pattern to match against
match
- port int
- Port for backends to receive traffic on.
- url str
- URL for HTTP probe type.
- type String
- Valid values :
http
,internal
,mysql
,oco
,pgsql
,smtp
,tcp
- force
Ssl Boolean - Force use of SSL (TLS)
- interval Number
- probe interval, Value between 30 and 3600 seconds, default 30
- match String
- What to match
pattern
against (contains
,default
,internal
,matches
,status
) - method String
- HTTP probe method (
GET
,HEAD
,OPTIONS
,internal
) - negate Boolean
- Negate probe result
- pattern String
- Pattern to match against
match
- port Number
- Port for backends to receive traffic on.
- url String
- URL for HTTP probe type.
Import
TCP Farm can be imported using the following format service_name
and the id
of the farm, separated by “/” e.g.
$ terraform import ovh_iploadbalancing_tcp_farm.farmname service_name/farm_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.