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,
},
],
});
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,
},
])
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
})
}
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,
},
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args MembersArgs
- 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 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 string
- The unique name of the resource.
- args MembersArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MembersArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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:
- Pool
Id string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- Member
List List<Pulumi.Open Stack. Load Balancer. Inputs. Members Member> - A set of dictionaries containing member parameters. The structure is described below.
- Region 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 string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- Members
[]Members
Member Args - A set of dictionaries containing member parameters. The structure is described below.
- Region 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 String - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- members
List<Members
Member> - A set of dictionaries containing member parameters. The structure is described below.
- region 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 string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- members
Members
Member[] - A set of dictionaries containing member parameters. The structure is described below.
- region 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 str - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- members
Sequence[Members
Member Args] - A set of dictionaries containing member parameters. The structure is described below.
- region 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.
- pool
Id 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 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)
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.
- Member
List List<Pulumi.Open Stack. Load Balancer. Inputs. Members Member> - A set of dictionaries containing member parameters. The structure is described below.
- Pool
Id string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- Region 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
[]Members
Member Args - A set of dictionaries containing member parameters. The structure is described below.
- Pool
Id string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- Region 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<Members
Member> - A set of dictionaries containing member parameters. The structure is described below.
- pool
Id String - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- region 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
Members
Member[] - A set of dictionaries containing member parameters. The structure is described below.
- pool
Id string - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- region 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[Members
Member Args] - A set of dictionaries containing member parameters. The structure is described below.
- pool_
id str - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- region 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.
- pool
Id String - The id of the pool that members will be assigned to. Changing this creates a new members resource.
- region 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 string
- The IP address of the members to receive traffic from the load balancer.
- Protocol
Port int - The port on which to listen for client traffic.
- Admin
State boolUp - 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.
- Monitor
Address string - 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 string
- Human-readable name for the member.
- Subnet
Id 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 string
- The IP address of the members to receive traffic from the load balancer.
- Protocol
Port int - The port on which to listen for client traffic.
- Admin
State boolUp - 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.
- Monitor
Address string - 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 string
- Human-readable name for the member.
- Subnet
Id 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 String
- The IP address of the members to receive traffic from the load balancer.
- protocol
Port Integer - The port on which to listen for client traffic.
- admin
State BooleanUp - 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.
- monitor
Address String - An alternate IP address used for health monitoring a backend member.
- monitor
Port Integer - An alternate protocol port used for health monitoring a backend member.
- name String
- Human-readable name for the member.
- subnet
Id 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 string
- The IP address of the members to receive traffic from the load balancer.
- protocol
Port number - The port on which to listen for client traffic.
- admin
State booleanUp - 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.
- monitor
Address string - An alternate IP address used for health monitoring a backend member.
- monitor
Port number - An alternate protocol port used for health monitoring a backend member.
- name string
- Human-readable name for the member.
- subnet
Id 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 str
- The IP address of the members to receive traffic from the load balancer.
- protocol_
port int - The port on which to listen for client traffic.
- admin_
state_ boolup - 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 String
- The IP address of the members to receive traffic from the load balancer.
- protocol
Port Number - The port on which to listen for client traffic.
- admin
State BooleanUp - 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.
- monitor
Address String - An alternate IP address used for health monitoring a backend member.
- monitor
Port Number - An alternate protocol port used for health monitoring a backend member.
- name String
- Human-readable name for the member.
- subnet
Id 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
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.