Show / Hide Table of Contents

Class PoolV1

Manages a V1 load balancer pool resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var pool1 = new OpenStack.LoadBalancer.PoolV1("pool1", new OpenStack.LoadBalancer.PoolV1Args
    {
        LbMethod = "ROUND_ROBIN",
        LbProvider = "haproxy",
        MonitorIds = 
        {
            "67890",
        },
        Protocol = "HTTP",
        SubnetId = "12345",
    });
}

}

Complete Load Balancing Stack Example

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
    {
        AdminStateUp = "true",
    });
    var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
    {
        Cidr = "192.168.199.0/24",
        IpVersion = 4,
        NetworkId = network1.Id,
    });
    var secgroup1 = new OpenStack.Compute.SecGroup("secgroup1", new OpenStack.Compute.SecGroupArgs
    {
        Description = "Rules for secgroup_1",
        Rules = 
        {
            new OpenStack.Compute.Inputs.SecGroupRuleArgs
            {
                Cidr = "0.0.0.0/0",
                FromPort = -1,
                IpProtocol = "icmp",
                ToPort = -1,
            },
            new OpenStack.Compute.Inputs.SecGroupRuleArgs
            {
                Cidr = "0.0.0.0/0",
                FromPort = 80,
                IpProtocol = "tcp",
                ToPort = 80,
            },
        },
    });
    var instance1 = new OpenStack.Compute.Instance("instance1", new OpenStack.Compute.InstanceArgs
    {
        Networks = 
        {
            new OpenStack.Compute.Inputs.InstanceNetworkArgs
            {
                Uuid = network1.Id,
            },
        },
        SecurityGroups = 
        {
            "default",
            secgroup1.Name,
        },
    });
    var instance2 = new OpenStack.Compute.Instance("instance2", new OpenStack.Compute.InstanceArgs
    {
        Networks = 
        {
            new OpenStack.Compute.Inputs.InstanceNetworkArgs
            {
                Uuid = network1.Id,
            },
        },
        SecurityGroups = 
        {
            "default",
            secgroup1.Name,
        },
    });
    var monitor1 = new OpenStack.LoadBalancer.MonitorV1("monitor1", new OpenStack.LoadBalancer.MonitorV1Args
    {
        AdminStateUp = "true",
        Delay = 30,
        MaxRetries = 3,
        Timeout = 5,
        Type = "TCP",
    });
    var pool1 = new OpenStack.LoadBalancer.PoolV1("pool1", new OpenStack.LoadBalancer.PoolV1Args
    {
        LbMethod = "ROUND_ROBIN",
        MonitorIds = 
        {
            monitor1.Id,
        },
        Protocol = "TCP",
        SubnetId = subnet1.Id,
    });
    var member1 = new OpenStack.LoadBalancer.MemberV1("member1", new OpenStack.LoadBalancer.MemberV1Args
    {
        Address = instance1.AccessIpV4,
        PoolId = pool1.Id,
        Port = 80,
    });
    var member2 = new OpenStack.LoadBalancer.MemberV1("member2", new OpenStack.LoadBalancer.MemberV1Args
    {
        Address = instance2.AccessIpV4,
        PoolId = pool1.Id,
        Port = 80,
    });
    var vip1 = new OpenStack.LoadBalancer.Vip("vip1", new OpenStack.LoadBalancer.VipArgs
    {
        PoolId = pool1.Id,
        Port = 80,
        Protocol = "TCP",
        SubnetId = subnet1.Id,
    });
}

}

Notes

The member block is deprecated in favor of the openstack.loadbalancer.MemberV1 resource.

Inheritance
System.Object
Resource
CustomResource
PoolV1
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.LoadBalancer
Assembly: Pulumi.OpenStack.dll
Syntax
public class PoolV1 : CustomResource

Constructors

View Source

PoolV1(String, PoolV1Args, CustomResourceOptions)

Create a PoolV1 resource with the given unique name, arguments, and options.

Declaration
public PoolV1(string name, PoolV1Args args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

PoolV1Args args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

LbMethod

The algorithm used to distribute load between the members of the pool. The current specification supports 'ROUND_ROBIN' and 'LEAST_CONNECTIONS' as valid values for this attribute.

Declaration
public Output<string> LbMethod { get; }
Property Value
Type Description
Output<System.String>
View Source

LbProvider

The backend load balancing provider. For example: haproxy, F5, etc.

Declaration
public Output<string> LbProvider { get; }
Property Value
Type Description
Output<System.String>
View Source

MonitorIds

A list of IDs of monitors to associate with the pool.

Declaration
public Output<ImmutableArray<string>> MonitorIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Name

The name of the pool. Changing this updates the name of the existing pool.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Protocol

The protocol used by the pool members, you can use either 'TCP, 'HTTP', or 'HTTPS'. Changing this creates a new pool.

Declaration
public Output<string> Protocol { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to obtain the V2 Networking client. A Networking client is needed to create an LB pool. If omitted, the region argument of the provider is used. Changing this creates a new LB pool.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

SubnetId

The network on which the members of the pool will be located. Only members that are on this network can be added to the pool. Changing this creates a new pool.

Declaration
public Output<string> SubnetId { get; }
Property Value
Type Description
Output<System.String>
View Source

TenantId

The owner of the member. Required if admin wants to create a pool member for another tenant. Changing this creates a new member.

Declaration
public Output<string> TenantId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, PoolV1State, CustomResourceOptions)

Get an existing PoolV1 resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static PoolV1 Get(string name, Input<string> id, PoolV1State state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

PoolV1State state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
PoolV1
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.