PoolV1

Manages a V1 load balancer pool resource within OpenStack.

Complete Load Balancing Stack Example

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    cidr: "192.168.199.0/24",
    ipVersion: 4,
    networkId: network1.id,
});
const secgroup1 = new openstack.compute.SecGroup("secgroup_1", {
    description: "Rules for secgroup_1",
    rules: [
        {
            cidr: "0.0.0.0/0",
            fromPort: -1,
            ipProtocol: "icmp",
            toPort: -1,
        },
        {
            cidr: "0.0.0.0/0",
            fromPort: 80,
            ipProtocol: "tcp",
            toPort: 80,
        },
    ],
});
const instance1 = new openstack.compute.Instance("instance_1", {
    networks: [{
        uuid: network1.id,
    }],
    securityGroups: [
        "default",
        secgroup1.name,
    ],
});
const instance2 = new openstack.compute.Instance("instance_2", {
    networks: [{
        uuid: network1.id,
    }],
    securityGroups: [
        "default",
        secgroup1.name,
    ],
});
const monitor1 = new openstack.loadbalancer.MonitorV1("monitor_1", {
    adminStateUp: "true",
    delay: 30,
    maxRetries: 3,
    timeout: 5,
    type: "TCP",
});
const pool1 = new openstack.loadbalancer.PoolV1("pool_1", {
    lbMethod: "ROUND_ROBIN",
    monitorIds: [monitor1.id],
    protocol: "TCP",
    subnetId: subnet1.id,
});
const member1 = new openstack.loadbalancer.MemberV1("member_1", {
    address: instance1.accessIpV4,
    poolId: pool1.id,
    port: 80,
});
const member2 = new openstack.loadbalancer.MemberV1("member_2", {
    address: instance2.accessIpV4,
    poolId: pool1.id,
    port: 80,
});
const vip1 = new openstack.loadbalancer.Vip("vip_1", {
    poolId: pool1.id,
    port: 80,
    protocol: "TCP",
    subnetId: subnet1.id,
});
import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
    cidr="192.168.199.0/24",
    ip_version=4,
    network_id=network1.id)
secgroup1 = openstack.compute.SecGroup("secgroup1",
    description="Rules for secgroup_1",
    rules=[
        {
            "cidr": "0.0.0.0/0",
            "fromPort": -1,
            "ipProtocol": "icmp",
            "toPort": -1,
        },
        {
            "cidr": "0.0.0.0/0",
            "fromPort": 80,
            "ipProtocol": "tcp",
            "toPort": 80,
        },
    ])
instance1 = openstack.compute.Instance("instance1",
    networks=[{
        "uuid": network1.id,
    }],
    security_groups=[
        "default",
        secgroup1.name,
    ])
instance2 = openstack.compute.Instance("instance2",
    networks=[{
        "uuid": network1.id,
    }],
    security_groups=[
        "default",
        secgroup1.name,
    ])
monitor1 = openstack.loadbalancer.MonitorV1("monitor1",
    admin_state_up="true",
    delay=30,
    max_retries=3,
    timeout=5,
    type="TCP")
pool1 = openstack.loadbalancer.PoolV1("pool1",
    lb_method="ROUND_ROBIN",
    monitor_ids=[monitor1.id],
    protocol="TCP",
    subnet_id=subnet1.id)
member1 = openstack.loadbalancer.MemberV1("member1",
    address=instance1.access_ip_v4,
    pool_id=pool1.id,
    port=80)
member2 = openstack.loadbalancer.MemberV1("member2",
    address=instance2.access_ip_v4,
    pool_id=pool1.id,
    port=80)
vip1 = openstack.loadbalancer.Vip("vip1",
    pool_id=pool1.id,
    port=80,
    protocol="TCP",
    subnet_id=subnet1.id)
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.

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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

pool1 = openstack.loadbalancer.PoolV1("pool1",
    lb_method="ROUND_ROBIN",
    lb_provider="haproxy",
    monitor_ids=["67890"],
    protocol="HTTP",
    subnet_id="12345")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const pool1 = new openstack.loadbalancer.PoolV1("pool_1", {
    lbMethod: "ROUND_ROBIN",
    lbProvider: "haproxy",
    monitorIds: ["67890"],
    protocol: "HTTP",
    subnetId: "12345",
});

Create a PoolV1 Resource

new PoolV1(name: string, args: PoolV1Args, opts?: CustomResourceOptions);
def PoolV1(resource_name, opts=None, lb_method=None, lb_provider=None, monitor_ids=None, name=None, protocol=None, region=None, subnet_id=None, tenant_id=None, __props__=None);
func NewPoolV1(ctx *Context, name string, args PoolV1Args, opts ...ResourceOption) (*PoolV1, error)
public PoolV1(string name, PoolV1Args args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PoolV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PoolV1Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PoolV1Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

PoolV1 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The PoolV1 resource accepts the following input properties:

LbMethod string

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.

Protocol string

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

SubnetId string

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.

LbProvider string

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

MonitorIds List<string>

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

Name string

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

Region string

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.

TenantId string

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

LbMethod string

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.

Protocol string

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

SubnetId string

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.

LbProvider string

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

MonitorIds []string

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

Name string

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

Region string

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.

TenantId string

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

lbMethod string

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.

protocol string

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

subnetId string

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.

lbProvider string

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

monitorIds string[]

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

name string

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

region string

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.

tenantId string

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

lb_method str

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.

protocol str

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

subnet_id str

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.

lb_provider str

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

monitor_ids List[str]

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

name str

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

region str

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.

tenant_id str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the PoolV1 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing PoolV1 Resource

Get an existing PoolV1 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?: PoolV1State, opts?: CustomResourceOptions): PoolV1
static get(resource_name, id, opts=None, lb_method=None, lb_provider=None, monitor_ids=None, name=None, protocol=None, region=None, subnet_id=None, tenant_id=None, __props__=None);
func GetPoolV1(ctx *Context, name string, id IDInput, state *PoolV1State, opts ...ResourceOption) (*PoolV1, error)
public static PoolV1 Get(string name, Input<string> id, PoolV1State? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

LbMethod string

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.

LbProvider string

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

MonitorIds List<string>

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

Name string

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

Protocol string

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

Region string

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.

SubnetId string

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.

TenantId string

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

LbMethod string

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.

LbProvider string

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

MonitorIds []string

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

Name string

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

Protocol string

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

Region string

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.

SubnetId string

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.

TenantId string

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

lbMethod string

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.

lbProvider string

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

monitorIds string[]

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

name string

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

protocol string

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

region string

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.

subnetId string

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.

tenantId string

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

lb_method str

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.

lb_provider str

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

monitor_ids List[str]

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

name str

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

protocol str

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

region str

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.

subnet_id str

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.

tenant_id str

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

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.