1. Packages
  2. Openstack Provider
  3. API Docs
  4. loadbalancer
  5. Members
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.loadbalancer.Members

Explore with Pulumi AI

Manages a V2 members resource within OpenStack (batch members update).

Note: This resource has attributes that depend on octavia minor versions. Please ensure your Openstack cloud supports the required minor version.

Example Usage

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

const members1 = new openstack.loadbalancer.Members("members_1", {
    poolId: "935685fb-a896-40f9-9ff4-ae531a3a00fe",
    members: [
        {
            address: "192.168.199.23",
            protocolPort: 8080,
        },
        {
            address: "192.168.199.24",
            protocolPort: 8080,
        },
    ],
});
Copy
import pulumi
import pulumi_openstack as openstack

members1 = openstack.loadbalancer.Members("members_1",
    pool_id="935685fb-a896-40f9-9ff4-ae531a3a00fe",
    members=[
        {
            "address": "192.168.199.23",
            "protocol_port": 8080,
        },
        {
            "address": "192.168.199.24",
            "protocol_port": 8080,
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/loadbalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loadbalancer.NewMembers(ctx, "members_1", &loadbalancer.MembersArgs{
			PoolId: pulumi.String("935685fb-a896-40f9-9ff4-ae531a3a00fe"),
			Members: loadbalancer.MembersMemberArray{
				&loadbalancer.MembersMemberArgs{
					Address:      pulumi.String("192.168.199.23"),
					ProtocolPort: pulumi.Int(8080),
				},
				&loadbalancer.MembersMemberArgs{
					Address:      pulumi.String("192.168.199.24"),
					ProtocolPort: pulumi.Int(8080),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var members1 = new OpenStack.LoadBalancer.Members("members_1", new()
    {
        PoolId = "935685fb-a896-40f9-9ff4-ae531a3a00fe",
        MemberList = new[]
        {
            new OpenStack.LoadBalancer.Inputs.MembersMemberArgs
            {
                Address = "192.168.199.23",
                ProtocolPort = 8080,
            },
            new OpenStack.LoadBalancer.Inputs.MembersMemberArgs
            {
                Address = "192.168.199.24",
                ProtocolPort = 8080,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.loadbalancer.Members;
import com.pulumi.openstack.loadbalancer.MembersArgs;
import com.pulumi.openstack.loadbalancer.inputs.MembersMemberArgs;
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) {
        var members1 = new Members("members1", MembersArgs.builder()
            .poolId("935685fb-a896-40f9-9ff4-ae531a3a00fe")
            .members(            
                MembersMemberArgs.builder()
                    .address("192.168.199.23")
                    .protocolPort(8080)
                    .build(),
                MembersMemberArgs.builder()
                    .address("192.168.199.24")
                    .protocolPort(8080)
                    .build())
            .build());

    }
}
Copy
resources:
  members1:
    type: openstack:loadbalancer:Members
    name: members_1
    properties:
      poolId: 935685fb-a896-40f9-9ff4-ae531a3a00fe
      members:
        - address: 192.168.199.23
          protocolPort: 8080
        - address: 192.168.199.24
          protocolPort: 8080
Copy

Create Members Resource

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

Constructor syntax

new Members(name: string, args: MembersArgs, opts?: CustomResourceOptions);
@overload
def Members(resource_name: str,
            args: MembersArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Members(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            pool_id: Optional[str] = None,
            members: Optional[Sequence[MembersMemberArgs]] = None,
            region: Optional[str] = None)
func NewMembers(ctx *Context, name string, args MembersArgs, opts ...ResourceOption) (*Members, error)
public Members(string name, MembersArgs args, CustomResourceOptions? opts = null)
public Members(String name, MembersArgs args)
public Members(String name, MembersArgs args, CustomResourceOptions options)
type: openstack:loadbalancer:Members
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MembersArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MembersArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MembersArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MembersArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MembersArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

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

var membersResource = new OpenStack.LoadBalancer.Members("membersResource", new()
{
    PoolId = "string",
    MemberList = new[]
    {
        new OpenStack.LoadBalancer.Inputs.MembersMemberArgs
        {
            Address = "string",
            ProtocolPort = 0,
            AdminStateUp = false,
            Backup = false,
            Id = "string",
            MonitorAddress = "string",
            MonitorPort = 0,
            Name = "string",
            SubnetId = "string",
            Weight = 0,
        },
    },
    Region = "string",
});
Copy
example, err := loadbalancer.NewMembers(ctx, "membersResource", &loadbalancer.MembersArgs{
	PoolId: pulumi.String("string"),
	Members: loadbalancer.MembersMemberArray{
		&loadbalancer.MembersMemberArgs{
			Address:        pulumi.String("string"),
			ProtocolPort:   pulumi.Int(0),
			AdminStateUp:   pulumi.Bool(false),
			Backup:         pulumi.Bool(false),
			Id:             pulumi.String("string"),
			MonitorAddress: pulumi.String("string"),
			MonitorPort:    pulumi.Int(0),
			Name:           pulumi.String("string"),
			SubnetId:       pulumi.String("string"),
			Weight:         pulumi.Int(0),
		},
	},
	Region: pulumi.String("string"),
})
Copy
var membersResource = new Members("membersResource", MembersArgs.builder()
    .poolId("string")
    .members(MembersMemberArgs.builder()
        .address("string")
        .protocolPort(0)
        .adminStateUp(false)
        .backup(false)
        .id("string")
        .monitorAddress("string")
        .monitorPort(0)
        .name("string")
        .subnetId("string")
        .weight(0)
        .build())
    .region("string")
    .build());
Copy
members_resource = openstack.loadbalancer.Members("membersResource",
    pool_id="string",
    members=[{
        "address": "string",
        "protocol_port": 0,
        "admin_state_up": False,
        "backup": False,
        "id": "string",
        "monitor_address": "string",
        "monitor_port": 0,
        "name": "string",
        "subnet_id": "string",
        "weight": 0,
    }],
    region="string")
Copy
const membersResource = new openstack.loadbalancer.Members("membersResource", {
    poolId: "string",
    members: [{
        address: "string",
        protocolPort: 0,
        adminStateUp: false,
        backup: false,
        id: "string",
        monitorAddress: "string",
        monitorPort: 0,
        name: "string",
        subnetId: "string",
        weight: 0,
    }],
    region: "string",
});
Copy
type: openstack:loadbalancer:Members
properties:
    members:
        - address: string
          adminStateUp: false
          backup: false
          id: string
          monitorAddress: string
          monitorPort: 0
          name: string
          protocolPort: 0
          subnetId: string
          weight: 0
    poolId: string
    region: string
Copy

Members Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Members resource accepts the following input properties:

PoolId
This property is required.
Changes to this property will trigger replacement.
string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
MemberList List<Pulumi.OpenStack.LoadBalancer.Inputs.MembersMember>
A set of dictionaries containing member parameters. The structure is described below.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
PoolId
This property is required.
Changes to this property will trigger replacement.
string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
Members []MembersMemberArgs
A set of dictionaries containing member parameters. The structure is described below.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
poolId
This property is required.
Changes to this property will trigger replacement.
String
The id of the pool that members will be assigned to. Changing this creates a new members resource.
members List<MembersMember>
A set of dictionaries containing member parameters. The structure is described below.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
poolId
This property is required.
Changes to this property will trigger replacement.
string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
members MembersMember[]
A set of dictionaries containing member parameters. The structure is described below.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
pool_id
This property is required.
Changes to this property will trigger replacement.
str
The id of the pool that members will be assigned to. Changing this creates a new members resource.
members Sequence[MembersMemberArgs]
A set of dictionaries containing member parameters. The structure is described below.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
poolId
This property is required.
Changes to this property will trigger replacement.
String
The id of the pool that members will be assigned to. Changing this creates a new members resource.
members List<Property Map>
A set of dictionaries containing member parameters. The structure is described below.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.

Outputs

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

Get an existing Members 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?: MembersState, opts?: CustomResourceOptions): Members
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        members: Optional[Sequence[MembersMemberArgs]] = None,
        pool_id: Optional[str] = None,
        region: Optional[str] = None) -> Members
func GetMembers(ctx *Context, name string, id IDInput, state *MembersState, opts ...ResourceOption) (*Members, error)
public static Members Get(string name, Input<string> id, MembersState? state, CustomResourceOptions? opts = null)
public static Members get(String name, Output<String> id, MembersState state, CustomResourceOptions options)
resources:  _:    type: openstack:loadbalancer:Members    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
MemberList List<Pulumi.OpenStack.LoadBalancer.Inputs.MembersMember>
A set of dictionaries containing member parameters. The structure is described below.
PoolId Changes to this property will trigger replacement. string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
Members []MembersMemberArgs
A set of dictionaries containing member parameters. The structure is described below.
PoolId Changes to this property will trigger replacement. string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
members List<MembersMember>
A set of dictionaries containing member parameters. The structure is described below.
poolId Changes to this property will trigger replacement. String
The id of the pool that members will be assigned to. Changing this creates a new members resource.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
members MembersMember[]
A set of dictionaries containing member parameters. The structure is described below.
poolId Changes to this property will trigger replacement. string
The id of the pool that members will be assigned to. Changing this creates a new members resource.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
members Sequence[MembersMemberArgs]
A set of dictionaries containing member parameters. The structure is described below.
pool_id Changes to this property will trigger replacement. str
The id of the pool that members will be assigned to. Changing this creates a new members resource.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.
members List<Property Map>
A set of dictionaries containing member parameters. The structure is described below.
poolId Changes to this property will trigger replacement. String
The id of the pool that members will be assigned to. Changing this creates a new members resource.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Networking client. A Networking client is needed to create pool members. If omitted, the region argument of the provider is used. Changing this creates a new members resource.

Supporting Types

MembersMember
, MembersMemberArgs

Address This property is required. string
The IP address of the members to receive traffic from the load balancer.
ProtocolPort This property is required. int
The port on which to listen for client traffic.
AdminStateUp bool
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
Backup bool
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
Id string
The unique ID for the members.
MonitorAddress string
An alternate IP address used for health monitoring a backend member.
MonitorPort int
An alternate protocol port used for health monitoring a backend member.
Name string
Human-readable name for the member.
SubnetId string
The subnet in which to access the member.
Weight int
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.
Address This property is required. string
The IP address of the members to receive traffic from the load balancer.
ProtocolPort This property is required. int
The port on which to listen for client traffic.
AdminStateUp bool
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
Backup bool
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
Id string
The unique ID for the members.
MonitorAddress string
An alternate IP address used for health monitoring a backend member.
MonitorPort int
An alternate protocol port used for health monitoring a backend member.
Name string
Human-readable name for the member.
SubnetId string
The subnet in which to access the member.
Weight int
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.
address This property is required. String
The IP address of the members to receive traffic from the load balancer.
protocolPort This property is required. Integer
The port on which to listen for client traffic.
adminStateUp Boolean
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
backup Boolean
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
id String
The unique ID for the members.
monitorAddress String
An alternate IP address used for health monitoring a backend member.
monitorPort Integer
An alternate protocol port used for health monitoring a backend member.
name String
Human-readable name for the member.
subnetId String
The subnet in which to access the member.
weight Integer
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.
address This property is required. string
The IP address of the members to receive traffic from the load balancer.
protocolPort This property is required. number
The port on which to listen for client traffic.
adminStateUp boolean
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
backup boolean
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
id string
The unique ID for the members.
monitorAddress string
An alternate IP address used for health monitoring a backend member.
monitorPort number
An alternate protocol port used for health monitoring a backend member.
name string
Human-readable name for the member.
subnetId string
The subnet in which to access the member.
weight number
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.
address This property is required. str
The IP address of the members to receive traffic from the load balancer.
protocol_port This property is required. int
The port on which to listen for client traffic.
admin_state_up bool
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
backup bool
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
id str
The unique ID for the members.
monitor_address str
An alternate IP address used for health monitoring a backend member.
monitor_port int
An alternate protocol port used for health monitoring a backend member.
name str
Human-readable name for the member.
subnet_id str
The subnet in which to access the member.
weight int
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.
address This property is required. String
The IP address of the members to receive traffic from the load balancer.
protocolPort This property is required. Number
The port on which to listen for client traffic.
adminStateUp Boolean
The administrative state of the member. A valid value is true (UP) or false (DOWN). Defaults to true.
backup Boolean
A bool that indicates whether the member is backup. Requires octavia minor version 2.1 or later.
id String
The unique ID for the members.
monitorAddress String
An alternate IP address used for health monitoring a backend member.
monitorPort Number
An alternate protocol port used for health monitoring a backend member.
name String
Human-readable name for the member.
subnetId String
The subnet in which to access the member.
weight Number
A positive integer value that indicates the relative portion of traffic that this members should receive from the pool. For example, a member with a weight of 10 receives five times as much traffic as a member with a weight of 2. Defaults to 1.

Import

Load Balancer Pool Members can be imported using the Pool ID, e.g.:

$ pulumi import openstack:loadbalancer/members:Members members_1 c22974d2-4c95-4bcb-9819-0afc5ed303d5
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.