ovh.IpLoadBalancing.TcpFrontend

Creates a backend server group (frontend) to be used by loadbalancing frontend(s)

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 farm80 = new Ovh.IpLoadBalancing.TcpFarm("farm80", new()
    {
        DisplayName = "ingress-8080-gra",
        Port = 80,
        ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
        Zone = "all",
    });

    var testfrontend = new Ovh.IpLoadBalancing.TcpFrontend("testfrontend", new()
    {
        DefaultFarmId = farm80.Id,
        DisplayName = "ingress-8080-gra",
        Port = "80,443",
        ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
        Zone = "all",
    });

});
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
		}
		farm80, err := IpLoadBalancing.NewTcpFarm(ctx, "farm80", &IpLoadBalancing.TcpFarmArgs{
			DisplayName: pulumi.String("ingress-8080-gra"),
			Port:        pulumi.Int(80),
			ServiceName: *pulumi.String(lb.ServiceName),
			Zone:        pulumi.String("all"),
		})
		if err != nil {
			return err
		}
		_, err = IpLoadBalancing.NewTcpFrontend(ctx, "testfrontend", &IpLoadBalancing.TcpFrontendArgs{
			DefaultFarmId: farm80.ID(),
			DisplayName:   pulumi.String("ingress-8080-gra"),
			Port:          pulumi.String("80,443"),
			ServiceName:   *pulumi.String(lb.ServiceName),
			Zone:          pulumi.String("all"),
		})
		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.TcpFarm;
import com.pulumi.ovh.IpLoadBalancing.TcpFarmArgs;
import com.pulumi.ovh.IpLoadBalancing.TcpFrontend;
import com.pulumi.ovh.IpLoadBalancing.TcpFrontendArgs;
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 farm80 = new TcpFarm("farm80", TcpFarmArgs.builder()        
            .displayName("ingress-8080-gra")
            .port(80)
            .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
            .zone("all")
            .build());

        var testfrontend = new TcpFrontend("testfrontend", TcpFrontendArgs.builder()        
            .defaultFarmId(farm80.id())
            .displayName("ingress-8080-gra")
            .port("80,443")
            .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
            .zone("all")
            .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")
farm80 = ovh.ip_load_balancing.TcpFarm("farm80",
    display_name="ingress-8080-gra",
    port=80,
    service_name=lb.service_name,
    zone="all")
testfrontend = ovh.ip_load_balancing.TcpFrontend("testfrontend",
    default_farm_id=farm80.id,
    display_name="ingress-8080-gra",
    port="80,443",
    service_name=lb.service_name,
    zone="all")
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 farm80 = new ovh.iploadbalancing.TcpFarm("farm80", {
    displayName: "ingress-8080-gra",
    port: 80,
    serviceName: lb.then(lb => lb.serviceName),
    zone: "all",
});
const testfrontend = new ovh.iploadbalancing.TcpFrontend("testfrontend", {
    defaultFarmId: farm80.id,
    displayName: "ingress-8080-gra",
    port: "80,443",
    serviceName: lb.then(lb => lb.serviceName),
    zone: "all",
});
resources:
  farm80:
    type: ovh:IpLoadBalancing:TcpFarm
    properties:
      displayName: ingress-8080-gra
      port: 80
      serviceName: ${lb.serviceName}
      zone: all
  testfrontend:
    type: ovh:IpLoadBalancing:TcpFrontend
    properties:
      defaultFarmId: ${farm80.id}
      displayName: ingress-8080-gra
      port: 80,443
      serviceName: ${lb.serviceName}
      zone: all
variables:
  lb:
    fn::invoke:
      Function: ovh:IpLoadBalancing:getIpLoadBalancing
      Arguments:
        serviceName: ip-1.2.3.4
        state: ok

Create TcpFrontend Resource

new TcpFrontend(name: string, args: TcpFrontendArgs, opts?: CustomResourceOptions);
@overload
def TcpFrontend(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                allowed_sources: Optional[Sequence[str]] = None,
                dedicated_ipfos: Optional[Sequence[str]] = None,
                default_farm_id: Optional[int] = None,
                default_ssl_id: Optional[int] = None,
                disabled: Optional[bool] = None,
                display_name: Optional[str] = None,
                port: Optional[str] = None,
                service_name: Optional[str] = None,
                ssl: Optional[bool] = None,
                zone: Optional[str] = None)
@overload
def TcpFrontend(resource_name: str,
                args: TcpFrontendArgs,
                opts: Optional[ResourceOptions] = None)
func NewTcpFrontend(ctx *Context, name string, args TcpFrontendArgs, opts ...ResourceOption) (*TcpFrontend, error)
public TcpFrontend(string name, TcpFrontendArgs args, CustomResourceOptions? opts = null)
public TcpFrontend(String name, TcpFrontendArgs args)
public TcpFrontend(String name, TcpFrontendArgs args, CustomResourceOptions options)
type: ovh:IpLoadBalancing:TcpFrontend
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TcpFrontendArgs
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 TcpFrontendArgs
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 TcpFrontendArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TcpFrontendArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TcpFrontendArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

ServiceName string

The internal name of your IP load balancing

Zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

AllowedSources List<string>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

DedicatedIpfos List<string>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

DefaultFarmId int

Default TCP Farm of your frontend

DefaultSslId int

Default ssl served to your customer

Disabled bool

Disable your frontend. Default: 'false'

DisplayName string

Human readable name for your frontend, this field is for you

Ssl bool

SSL deciphering. Default: 'false'

Port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

ServiceName string

The internal name of your IP load balancing

Zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

AllowedSources []string

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

DedicatedIpfos []string

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

DefaultFarmId int

Default TCP Farm of your frontend

DefaultSslId int

Default ssl served to your customer

Disabled bool

Disable your frontend. Default: 'false'

DisplayName string

Human readable name for your frontend, this field is for you

Ssl bool

SSL deciphering. Default: 'false'

port String

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName String

The internal name of your IP load balancing

zone String

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources List<String>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos List<String>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId Integer

Default TCP Farm of your frontend

defaultSslId Integer

Default ssl served to your customer

disabled Boolean

Disable your frontend. Default: 'false'

displayName String

Human readable name for your frontend, this field is for you

ssl Boolean

SSL deciphering. Default: 'false'

port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName string

The internal name of your IP load balancing

zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources string[]

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos string[]

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId number

Default TCP Farm of your frontend

defaultSslId number

Default ssl served to your customer

disabled boolean

Disable your frontend. Default: 'false'

displayName string

Human readable name for your frontend, this field is for you

ssl boolean

SSL deciphering. Default: 'false'

port str

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

service_name str

The internal name of your IP load balancing

zone str

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowed_sources Sequence[str]

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicated_ipfos Sequence[str]

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

default_farm_id int

Default TCP Farm of your frontend

default_ssl_id int

Default ssl served to your customer

disabled bool

Disable your frontend. Default: 'false'

display_name str

Human readable name for your frontend, this field is for you

ssl bool

SSL deciphering. Default: 'false'

port String

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName String

The internal name of your IP load balancing

zone String

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources List<String>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos List<String>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId Number

Default TCP Farm of your frontend

defaultSslId Number

Default ssl served to your customer

disabled Boolean

Disable your frontend. Default: 'false'

displayName String

Human readable name for your frontend, this field is for you

ssl Boolean

SSL deciphering. Default: 'false'

Outputs

All input properties are implicitly available as output properties. Additionally, the TcpFrontend 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 TcpFrontend Resource

Get an existing TcpFrontend 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?: TcpFrontendState, opts?: CustomResourceOptions): TcpFrontend
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allowed_sources: Optional[Sequence[str]] = None,
        dedicated_ipfos: Optional[Sequence[str]] = None,
        default_farm_id: Optional[int] = None,
        default_ssl_id: Optional[int] = None,
        disabled: Optional[bool] = None,
        display_name: Optional[str] = None,
        port: Optional[str] = None,
        service_name: Optional[str] = None,
        ssl: Optional[bool] = None,
        zone: Optional[str] = None) -> TcpFrontend
func GetTcpFrontend(ctx *Context, name string, id IDInput, state *TcpFrontendState, opts ...ResourceOption) (*TcpFrontend, error)
public static TcpFrontend Get(string name, Input<string> id, TcpFrontendState? state, CustomResourceOptions? opts = null)
public static TcpFrontend get(String name, Output<String> id, TcpFrontendState 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:
AllowedSources List<string>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

DedicatedIpfos List<string>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

DefaultFarmId int

Default TCP Farm of your frontend

DefaultSslId int

Default ssl served to your customer

Disabled bool

Disable your frontend. Default: 'false'

DisplayName string

Human readable name for your frontend, this field is for you

Port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

ServiceName string

The internal name of your IP load balancing

Ssl bool

SSL deciphering. Default: 'false'

Zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

AllowedSources []string

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

DedicatedIpfos []string

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

DefaultFarmId int

Default TCP Farm of your frontend

DefaultSslId int

Default ssl served to your customer

Disabled bool

Disable your frontend. Default: 'false'

DisplayName string

Human readable name for your frontend, this field is for you

Port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

ServiceName string

The internal name of your IP load balancing

Ssl bool

SSL deciphering. Default: 'false'

Zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources List<String>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos List<String>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId Integer

Default TCP Farm of your frontend

defaultSslId Integer

Default ssl served to your customer

disabled Boolean

Disable your frontend. Default: 'false'

displayName String

Human readable name for your frontend, this field is for you

port String

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName String

The internal name of your IP load balancing

ssl Boolean

SSL deciphering. Default: 'false'

zone String

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources string[]

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos string[]

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId number

Default TCP Farm of your frontend

defaultSslId number

Default ssl served to your customer

disabled boolean

Disable your frontend. Default: 'false'

displayName string

Human readable name for your frontend, this field is for you

port string

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName string

The internal name of your IP load balancing

ssl boolean

SSL deciphering. Default: 'false'

zone string

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowed_sources Sequence[str]

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicated_ipfos Sequence[str]

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

default_farm_id int

Default TCP Farm of your frontend

default_ssl_id int

Default ssl served to your customer

disabled bool

Disable your frontend. Default: 'false'

display_name str

Human readable name for your frontend, this field is for you

port str

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

service_name str

The internal name of your IP load balancing

ssl bool

SSL deciphering. Default: 'false'

zone str

Zone where the frontend will be defined (ie. gra, bhs also supports all)

allowedSources List<String>

Restrict IP Load Balancing access to these ip block. No restriction if null. List of IP blocks.

dedicatedIpfos List<String>

Only attach frontend on these ip. No restriction if null. List of Ip blocks.

defaultFarmId Number

Default TCP Farm of your frontend

defaultSslId Number

Default ssl served to your customer

disabled Boolean

Disable your frontend. Default: 'false'

displayName String

Human readable name for your frontend, this field is for you

port String

Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range

serviceName String

The internal name of your IP load balancing

ssl Boolean

SSL deciphering. Default: 'false'

zone String

Zone where the frontend will be defined (ie. gra, bhs also supports all)

Package Details

Repository
ovh lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.