ovh.IpLoadBalancing.Refresh

Applies changes from other ovh_iploadbalancing_* resources to the production configuration of loadbalancers.

Example Usage

using System.Collections.Generic;
using System.Linq;
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.TcpFarm("farmname", new()
    {
        Port = 8080,
        ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.Id),
        Zone = "all",
    });

    var backend = new Ovh.IpLoadBalancing.TcpFarmServer("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,
    });

    var mylb = new Ovh.IpLoadBalancing.Refresh("mylb", new()
    {
        Keepers = new[]
        {
            new[]
            {
                backend,
            }.Select(__item => __item.Address).ToList(),
        },
        ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.Id),
    });

});

Coming soon!

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.TcpFarmServer;
import com.pulumi.ovh.IpLoadBalancing.TcpFarmServerArgs;
import com.pulumi.ovh.IpLoadBalancing.Refresh;
import com.pulumi.ovh.IpLoadBalancing.RefreshArgs;
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()        
            .port(8080)
            .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.id()))
            .zone("all")
            .build());

        var backend = new TcpFarmServer("backend", TcpFarmServerArgs.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());

        var mylb = new Refresh("mylb", RefreshArgs.builder()        
            .keepers(backend.stream().map(element -> element.address()).collect(toList()))
            .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.id()))
            .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.TcpFarm("farmname",
    port=8080,
    service_name=lb.id,
    zone="all")
backend = ovh.ip_load_balancing.TcpFarmServer("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)
mylb = ovh.ip_load_balancing.Refresh("mylb",
    keepers=[[__item.address for __item in [backend]]],
    service_name=lb.id)
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.TcpFarm("farmname", {
    port: 8080,
    serviceName: lb.then(lb => lb.id),
    zone: "all",
});
const backend = new ovh.iploadbalancing.TcpFarmServer("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,
});
const mylb = new ovh.iploadbalancing.Refresh("mylb", {
    keepers: [[backend].map(__item => __item.address)],
    serviceName: lb.then(lb => lb.id),
});

Coming soon!

Create Refresh Resource

new Refresh(name: string, args: RefreshArgs, opts?: CustomResourceOptions);
@overload
def Refresh(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            keepers: Optional[Sequence[str]] = None,
            service_name: Optional[str] = None)
@overload
def Refresh(resource_name: str,
            args: RefreshArgs,
            opts: Optional[ResourceOptions] = None)
func NewRefresh(ctx *Context, name string, args RefreshArgs, opts ...ResourceOption) (*Refresh, error)
public Refresh(string name, RefreshArgs args, CustomResourceOptions? opts = null)
public Refresh(String name, RefreshArgs args)
public Refresh(String name, RefreshArgs args, CustomResourceOptions options)
type: ovh:IpLoadBalancing:Refresh
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Keepers List<string>

List of values tracked to trigger refresh, used also to form implicit dependencies

ServiceName string

The internal name of your IP load balancing

Keepers []string

List of values tracked to trigger refresh, used also to form implicit dependencies

ServiceName string

The internal name of your IP load balancing

keepers List<String>

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName String

The internal name of your IP load balancing

keepers string[]

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName string

The internal name of your IP load balancing

keepers Sequence[str]

List of values tracked to trigger refresh, used also to form implicit dependencies

service_name str

The internal name of your IP load balancing

keepers List<String>

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName String

The internal name of your IP load balancing

Outputs

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

Get an existing Refresh 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?: RefreshState, opts?: CustomResourceOptions): Refresh
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        keepers: Optional[Sequence[str]] = None,
        service_name: Optional[str] = None) -> Refresh
func GetRefresh(ctx *Context, name string, id IDInput, state *RefreshState, opts ...ResourceOption) (*Refresh, error)
public static Refresh Get(string name, Input<string> id, RefreshState? state, CustomResourceOptions? opts = null)
public static Refresh get(String name, Output<String> id, RefreshState 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:
Keepers List<string>

List of values tracked to trigger refresh, used also to form implicit dependencies

ServiceName string

The internal name of your IP load balancing

Keepers []string

List of values tracked to trigger refresh, used also to form implicit dependencies

ServiceName string

The internal name of your IP load balancing

keepers List<String>

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName String

The internal name of your IP load balancing

keepers string[]

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName string

The internal name of your IP load balancing

keepers Sequence[str]

List of values tracked to trigger refresh, used also to form implicit dependencies

service_name str

The internal name of your IP load balancing

keepers List<String>

List of values tracked to trigger refresh, used also to form implicit dependencies

serviceName String

The internal name of your IP load balancing

Package Details

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

This Pulumi package is based on the ovh Terraform Provider.