ibm.LbServiceGroup
Explore with Pulumi AI
Create, update, and delete a local load balancer service group.
Note
For more information, see the IBM Cloud Classic Infrastructure (SoftLayer) API docs.
Example Usage
In the following example, you can create a local load balancer service group:
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const testServiceGroup = new ibm.LbServiceGroup("testServiceGroup", {
port: 82,
routingMethod: "CONSISTENT_HASH_IP",
routingType: "HTTP",
loadBalancerId: ibm_lb.test_lb_local.id,
allocation: 100,
});
import pulumi
import pulumi_ibm as ibm
test_service_group = ibm.LbServiceGroup("testServiceGroup",
port=82,
routing_method="CONSISTENT_HASH_IP",
routing_type="HTTP",
load_balancer_id=ibm_lb["test_lb_local"]["id"],
allocation=100)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewLbServiceGroup(ctx, "testServiceGroup", &ibm.LbServiceGroupArgs{
Port: pulumi.Float64(82),
RoutingMethod: pulumi.String("CONSISTENT_HASH_IP"),
RoutingType: pulumi.String("HTTP"),
LoadBalancerId: pulumi.Any(ibm_lb.Test_lb_local.Id),
Allocation: pulumi.Float64(100),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var testServiceGroup = new Ibm.LbServiceGroup("testServiceGroup", new()
{
Port = 82,
RoutingMethod = "CONSISTENT_HASH_IP",
RoutingType = "HTTP",
LoadBalancerId = ibm_lb.Test_lb_local.Id,
Allocation = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.LbServiceGroup;
import com.pulumi.ibm.LbServiceGroupArgs;
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 testServiceGroup = new LbServiceGroup("testServiceGroup", LbServiceGroupArgs.builder()
.port(82)
.routingMethod("CONSISTENT_HASH_IP")
.routingType("HTTP")
.loadBalancerId(ibm_lb.test_lb_local().id())
.allocation(100)
.build());
}
}
resources:
testServiceGroup:
type: ibm:LbServiceGroup
properties:
port: 82
routingMethod: CONSISTENT_HASH_IP
routingType: HTTP
loadBalancerId: ${ibm_lb.test_lb_local.id}
allocation: 100
Argument reference
Review the argument references that you can specify for your resource.
allocation
- (Required, Integer) The connection allocation for the load balancer service group.load_balancer_id
- (Required, Forces new resource,Integer) The ID of the local load balancer.port
- (Required, Integer) The port for the local load balancer service group.routing_method
- (Required, String) The routing method for the load balancer group. For example,CONSISTENT_HASH_IP
.routing_type
- (Required, String) The routing type for the group.timeout
- (Optional, Integer) The timeout value for connections from remote clients to the load balancer. Timeout values are only valid for HTTP service groups.tags
- (Optional, Array of Strings) Tags associated with the local load balancer service group instance. NoteTags
are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
Create LbServiceGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbServiceGroup(name: string, args: LbServiceGroupArgs, opts?: CustomResourceOptions);
@overload
def LbServiceGroup(resource_name: str,
args: LbServiceGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LbServiceGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
allocation: Optional[float] = None,
load_balancer_id: Optional[float] = None,
port: Optional[float] = None,
routing_method: Optional[str] = None,
routing_type: Optional[str] = None,
lb_service_group_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeout: Optional[float] = None)
func NewLbServiceGroup(ctx *Context, name string, args LbServiceGroupArgs, opts ...ResourceOption) (*LbServiceGroup, error)
public LbServiceGroup(string name, LbServiceGroupArgs args, CustomResourceOptions? opts = null)
public LbServiceGroup(String name, LbServiceGroupArgs args)
public LbServiceGroup(String name, LbServiceGroupArgs args, CustomResourceOptions options)
type: ibm:LbServiceGroup
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 LbServiceGroupArgs
- 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 LbServiceGroupArgs
- 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 LbServiceGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbServiceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LbServiceGroupArgs
- 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 lbServiceGroupResource = new Ibm.LbServiceGroup("lbServiceGroupResource", new()
{
Allocation = 0,
LoadBalancerId = 0,
Port = 0,
RoutingMethod = "string",
RoutingType = "string",
LbServiceGroupId = "string",
Tags = new[]
{
"string",
},
Timeout = 0,
});
example, err := ibm.NewLbServiceGroup(ctx, "lbServiceGroupResource", &ibm.LbServiceGroupArgs{
Allocation: pulumi.Float64(0),
LoadBalancerId: pulumi.Float64(0),
Port: pulumi.Float64(0),
RoutingMethod: pulumi.String("string"),
RoutingType: pulumi.String("string"),
LbServiceGroupId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeout: pulumi.Float64(0),
})
var lbServiceGroupResource = new LbServiceGroup("lbServiceGroupResource", LbServiceGroupArgs.builder()
.allocation(0)
.loadBalancerId(0)
.port(0)
.routingMethod("string")
.routingType("string")
.lbServiceGroupId("string")
.tags("string")
.timeout(0)
.build());
lb_service_group_resource = ibm.LbServiceGroup("lbServiceGroupResource",
allocation=0,
load_balancer_id=0,
port=0,
routing_method="string",
routing_type="string",
lb_service_group_id="string",
tags=["string"],
timeout=0)
const lbServiceGroupResource = new ibm.LbServiceGroup("lbServiceGroupResource", {
allocation: 0,
loadBalancerId: 0,
port: 0,
routingMethod: "string",
routingType: "string",
lbServiceGroupId: "string",
tags: ["string"],
timeout: 0,
});
type: ibm:LbServiceGroup
properties:
allocation: 0
lbServiceGroupId: string
loadBalancerId: 0
port: 0
routingMethod: string
routingType: string
tags:
- string
timeout: 0
LbServiceGroup 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 LbServiceGroup resource accepts the following input properties:
- Allocation double
- Allocation type
- Load
Balancer doubleId - Loadbalancer ID
- Port double
- Port number
- Routing
Method string - Routing method
- Routing
Type string - Routing type
- Lb
Service stringGroup Id - List<string>
- List of tags
- Timeout double
- Timeout value
- Allocation float64
- Allocation type
- Load
Balancer float64Id - Loadbalancer ID
- Port float64
- Port number
- Routing
Method string - Routing method
- Routing
Type string - Routing type
- Lb
Service stringGroup Id - []string
- List of tags
- Timeout float64
- Timeout value
- allocation Double
- Allocation type
- load
Balancer DoubleId - Loadbalancer ID
- port Double
- Port number
- routing
Method String - Routing method
- routing
Type String - Routing type
- lb
Service StringGroup Id - List<String>
- List of tags
- timeout Double
- Timeout value
- allocation number
- Allocation type
- load
Balancer numberId - Loadbalancer ID
- port number
- Port number
- routing
Method string - Routing method
- routing
Type string - Routing type
- lb
Service stringGroup Id - string[]
- List of tags
- timeout number
- Timeout value
- allocation float
- Allocation type
- load_
balancer_ floatid - Loadbalancer ID
- port float
- Port number
- routing_
method str - Routing method
- routing_
type str - Routing type
- lb_
service_ strgroup_ id - Sequence[str]
- List of tags
- timeout float
- Timeout value
- allocation Number
- Allocation type
- load
Balancer NumberId - Loadbalancer ID
- port Number
- Port number
- routing
Method String - Routing method
- routing
Type String - Routing type
- lb
Service StringGroup Id - List<String>
- List of tags
- timeout Number
- Timeout value
Outputs
All input properties are implicitly available as output properties. Additionally, the LbServiceGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Group doubleId - (String) The unique identifier of the load balancer service group.
- Virtual
Server doubleId - (String) The unique identifier of the virtual server.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Group float64Id - (String) The unique identifier of the load balancer service group.
- Virtual
Server float64Id - (String) The unique identifier of the virtual server.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Group DoubleId - (String) The unique identifier of the load balancer service group.
- virtual
Server DoubleId - (String) The unique identifier of the virtual server.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Group numberId - (String) The unique identifier of the load balancer service group.
- virtual
Server numberId - (String) The unique identifier of the virtual server.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
group_ floatid - (String) The unique identifier of the load balancer service group.
- virtual_
server_ floatid - (String) The unique identifier of the virtual server.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Group NumberId - (String) The unique identifier of the load balancer service group.
- virtual
Server NumberId - (String) The unique identifier of the virtual server.
Look up Existing LbServiceGroup Resource
Get an existing LbServiceGroup 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?: LbServiceGroupState, opts?: CustomResourceOptions): LbServiceGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocation: Optional[float] = None,
lb_service_group_id: Optional[str] = None,
load_balancer_id: Optional[float] = None,
port: Optional[float] = None,
routing_method: Optional[str] = None,
routing_type: Optional[str] = None,
service_group_id: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
timeout: Optional[float] = None,
virtual_server_id: Optional[float] = None) -> LbServiceGroup
func GetLbServiceGroup(ctx *Context, name string, id IDInput, state *LbServiceGroupState, opts ...ResourceOption) (*LbServiceGroup, error)
public static LbServiceGroup Get(string name, Input<string> id, LbServiceGroupState? state, CustomResourceOptions? opts = null)
public static LbServiceGroup get(String name, Output<String> id, LbServiceGroupState state, CustomResourceOptions options)
resources: _: type: ibm:LbServiceGroup get: id: ${id}
- 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.
- Allocation double
- Allocation type
- Lb
Service stringGroup Id - Load
Balancer doubleId - Loadbalancer ID
- Port double
- Port number
- Routing
Method string - Routing method
- Routing
Type string - Routing type
- Service
Group doubleId - (String) The unique identifier of the load balancer service group.
- List<string>
- List of tags
- Timeout double
- Timeout value
- Virtual
Server doubleId - (String) The unique identifier of the virtual server.
- Allocation float64
- Allocation type
- Lb
Service stringGroup Id - Load
Balancer float64Id - Loadbalancer ID
- Port float64
- Port number
- Routing
Method string - Routing method
- Routing
Type string - Routing type
- Service
Group float64Id - (String) The unique identifier of the load balancer service group.
- []string
- List of tags
- Timeout float64
- Timeout value
- Virtual
Server float64Id - (String) The unique identifier of the virtual server.
- allocation Double
- Allocation type
- lb
Service StringGroup Id - load
Balancer DoubleId - Loadbalancer ID
- port Double
- Port number
- routing
Method String - Routing method
- routing
Type String - Routing type
- service
Group DoubleId - (String) The unique identifier of the load balancer service group.
- List<String>
- List of tags
- timeout Double
- Timeout value
- virtual
Server DoubleId - (String) The unique identifier of the virtual server.
- allocation number
- Allocation type
- lb
Service stringGroup Id - load
Balancer numberId - Loadbalancer ID
- port number
- Port number
- routing
Method string - Routing method
- routing
Type string - Routing type
- service
Group numberId - (String) The unique identifier of the load balancer service group.
- string[]
- List of tags
- timeout number
- Timeout value
- virtual
Server numberId - (String) The unique identifier of the virtual server.
- allocation float
- Allocation type
- lb_
service_ strgroup_ id - load_
balancer_ floatid - Loadbalancer ID
- port float
- Port number
- routing_
method str - Routing method
- routing_
type str - Routing type
- service_
group_ floatid - (String) The unique identifier of the load balancer service group.
- Sequence[str]
- List of tags
- timeout float
- Timeout value
- virtual_
server_ floatid - (String) The unique identifier of the virtual server.
- allocation Number
- Allocation type
- lb
Service StringGroup Id - load
Balancer NumberId - Loadbalancer ID
- port Number
- Port number
- routing
Method String - Routing method
- routing
Type String - Routing type
- service
Group NumberId - (String) The unique identifier of the load balancer service group.
- List<String>
- List of tags
- timeout Number
- Timeout value
- virtual
Server NumberId - (String) The unique identifier of the virtual server.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.