1. Packages
  2. OVH
  3. API Docs
  4. IpLoadBalancing
  5. HttpFarm
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

ovh.IpLoadBalancing.HttpFarm

Explore with Pulumi AI

ovh logo
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

    Creates a HTTP 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.HttpFarm("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.HttpFarm("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.NewHttpFarm(ctx, "farmname", &IpLoadBalancing.HttpFarmArgs{
    			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.HttpFarm("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.HttpFarm;
    import com.pulumi.ovh.IpLoadBalancing.HttpFarmArgs;
    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()        
                .displayName("ingress-8080-gra")
                .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
                .zone("GRA")
                .build());
    
        }
    }
    
    resources:
      farmname:
        type: ovh:IpLoadBalancing:HttpFarm
        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 HttpFarm Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HttpFarm(name: string, args: HttpFarmArgs, opts?: CustomResourceOptions);
    @overload
    def HttpFarm(resource_name: str,
                 args: HttpFarmArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def HttpFarm(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.HttpFarmProbeArgs] = None,
                 stickiness: Optional[str] = None,
                 vrack_network_id: Optional[int] = None)
    func NewHttpFarm(ctx *Context, name string, args HttpFarmArgs, opts ...ResourceOption) (*HttpFarm, error)
    public HttpFarm(string name, HttpFarmArgs args, CustomResourceOptions? opts = null)
    public HttpFarm(String name, HttpFarmArgs args)
    public HttpFarm(String name, HttpFarmArgs args, CustomResourceOptions options)
    
    type: ovh:IpLoadBalancing:HttpFarm
    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 HttpFarmArgs
    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 HttpFarmArgs
    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 HttpFarmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HttpFarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HttpFarmArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var httpFarmResource = new Ovh.IpLoadBalancing.HttpFarm("httpFarmResource", new()
    {
        ServiceName = "string",
        Zone = "string",
        Balance = "string",
        DisplayName = "string",
        Port = 0,
        Probe = new Ovh.IpLoadBalancing.Inputs.HttpFarmProbeArgs
        {
            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.NewHttpFarm(ctx, "httpFarmResource", &IpLoadBalancing.HttpFarmArgs{
    	ServiceName: pulumi.String("string"),
    	Zone:        pulumi.String("string"),
    	Balance:     pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Port:        pulumi.Int(0),
    	Probe: &iploadbalancing.HttpFarmProbeArgs{
    		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 httpFarmResource = new HttpFarm("httpFarmResource", HttpFarmArgs.builder()        
        .serviceName("string")
        .zone("string")
        .balance("string")
        .displayName("string")
        .port(0)
        .probe(HttpFarmProbeArgs.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());
    
    http_farm_resource = ovh.ip_load_balancing.HttpFarm("httpFarmResource",
        service_name="string",
        zone="string",
        balance="string",
        display_name="string",
        port=0,
        probe=ovh.ip_load_balancing.HttpFarmProbeArgs(
            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 httpFarmResource = new ovh.iploadbalancing.HttpFarm("httpFarmResource", {
        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:HttpFarm
    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
    

    HttpFarm 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 HttpFarm resource accepts the following input properties:

    ServiceName string
    The internal name of your IP load balancing
    Zone string
    Zone where the farm will be defined (ie. GRA, BHS also supports ALL)
    Balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    DisplayName string
    Readable label for loadbalancer farm
    Port int
    Port for backends to receive traffic on.
    Probe HttpFarmProbe
    define a backend healthcheck probe
    Stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    VrackNetworkId int
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    ServiceName string
    The internal name of your IP load balancing
    Zone string
    Zone where the farm will be defined (ie. GRA, BHS also supports ALL)
    Balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    DisplayName string
    Readable label for loadbalancer farm
    Port int
    Port for backends to receive traffic on.
    Probe HttpFarmProbeArgs
    define a backend healthcheck probe
    Stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    VrackNetworkId int
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    serviceName String
    The internal name of your IP load balancing
    zone String
    Zone where the farm will be defined (ie. GRA, BHS also supports ALL)
    balance String
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName String
    Readable label for loadbalancer farm
    port Integer
    Port for backends to receive traffic on.
    probe HttpFarmProbe
    define a backend healthcheck probe
    stickiness String
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId Integer
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    serviceName string
    The internal name of your IP load balancing
    zone string
    Zone where the farm will be defined (ie. GRA, BHS also supports ALL)
    balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName string
    Readable label for loadbalancer farm
    port number
    Port for backends to receive traffic on.
    probe HttpFarmProbe
    define a backend healthcheck probe
    stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId number
    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 supports ALL)
    balance str
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    display_name str
    Readable label for loadbalancer farm
    port int
    Port for backends to receive traffic on.
    probe iploadbalancing.HttpFarmProbeArgs
    define a backend healthcheck probe
    stickiness str
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrack_network_id int
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    serviceName String
    The internal name of your IP load balancing
    zone String
    Zone where the farm will be defined (ie. GRA, BHS also supports ALL)
    balance String
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName String
    Readable label for loadbalancer farm
    port Number
    Port for backends to receive traffic on.
    probe Property Map
    define a backend healthcheck probe
    stickiness String
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId Number
    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 HttpFarm 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 HttpFarm Resource

    Get an existing HttpFarm 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?: HttpFarmState, opts?: CustomResourceOptions): HttpFarm
    @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.HttpFarmProbeArgs] = None,
            service_name: Optional[str] = None,
            stickiness: Optional[str] = None,
            vrack_network_id: Optional[int] = None,
            zone: Optional[str] = None) -> HttpFarm
    func GetHttpFarm(ctx *Context, name string, id IDInput, state *HttpFarmState, opts ...ResourceOption) (*HttpFarm, error)
    public static HttpFarm Get(string name, Input<string> id, HttpFarmState? state, CustomResourceOptions? opts = null)
    public static HttpFarm get(String name, Output<String> id, HttpFarmState 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:
    Balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    DisplayName string
    Readable label for loadbalancer farm
    Port int
    Port for backends to receive traffic on.
    Probe HttpFarmProbe
    define a backend healthcheck probe
    ServiceName string
    The internal name of your IP load balancing
    Stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    VrackNetworkId int
    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 supports ALL)
    Balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    DisplayName string
    Readable label for loadbalancer farm
    Port int
    Port for backends to receive traffic on.
    Probe HttpFarmProbeArgs
    define a backend healthcheck probe
    ServiceName string
    The internal name of your IP load balancing
    Stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    VrackNetworkId int
    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 supports ALL)
    balance String
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName String
    Readable label for loadbalancer farm
    port Integer
    Port for backends to receive traffic on.
    probe HttpFarmProbe
    define a backend healthcheck probe
    serviceName String
    The internal name of your IP load balancing
    stickiness String
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId Integer
    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 supports ALL)
    balance string
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName string
    Readable label for loadbalancer farm
    port number
    Port for backends to receive traffic on.
    probe HttpFarmProbe
    define a backend healthcheck probe
    serviceName string
    The internal name of your IP load balancing
    stickiness string
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId number
    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 supports ALL)
    balance str
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    display_name str
    Readable label for loadbalancer farm
    port int
    Port for backends to receive traffic on.
    probe iploadbalancing.HttpFarmProbeArgs
    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, cookie)
    vrack_network_id int
    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 supports ALL)
    balance String
    Load balancing algorithm. roundrobin if null (first, leastconn, roundrobin, source)
    displayName String
    Readable label for loadbalancer farm
    port Number
    Port for backends to receive traffic on.
    probe Property Map
    define a backend healthcheck probe
    serviceName String
    The internal name of your IP load balancing
    stickiness String
    Stickiness type. No stickiness if null (sourceIp, cookie)
    vrackNetworkId Number
    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 supports ALL)

    Supporting Types

    HttpFarmProbe, HttpFarmProbeArgs

    Type string
    Valid values : http, internal, mysql, oco, pgsql, smtp, tcp
    ForceSsl 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
    ForceSsl 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
    forceSsl 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
    forceSsl 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
    forceSsl 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

    HTTP farm can be imported using the following format service_name and the id of the farm, separated by “/” e.g.

    $ terraform import ovh_iploadbalancing_http_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.
    ovh logo
    OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud