1. Packages
  2. Ibm Provider
  3. API Docs
  4. Lb
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.Lb

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, and delete a load balancer. For more information, about load balancer, see selecting the service and configuring basic parameters.

    Example Usage

    In the following example, you can create a local load balancer:

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.Lb;
    import com.pulumi.ibm.LbArgs;
    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 testLbLocal = new Lb("testLbLocal", LbArgs.builder()
                .connections(1500)
                .datacenter("tok02")
                .haEnabled(false)
                .dedicated(false)
                .timeouts(LbTimeoutsArgs.builder()
                    .create("45m")
                    .build())
                .build());
    
        }
    }
    
    resources:
      testLbLocal:
        type: ibm:Lb
        properties:
          connections: 1500
          datacenter: tok02
          haEnabled: false
          dedicated: false
          # User can increase timeouts
          timeouts:
            - create: 45m
    

    Argument reference

    Review the argument references that you can specify for your resource.

    • connections - (Required, Integer) The number of connections for the local load balancer. Only incremental upgrade is supported. For downgrade, please open the SoftLayer support ticket.
    • datacenter - (Required, Forces new resource, String)The data center for the local load balancer.
    • dedicated - (Optional, Bool) Specifies whether the local load balancer must be dedicated. The default value is false.
    • ha_enabled- (Required, Forces new resource, Bool) Specifies whether the local load balancer must be HA-enabled.
    • security_certificate_id - (Optional, Forces new resource, Integer) The ID of the security certificate associated with the local load balancer.
    • ssl_offload - (Optional, Bool) Specifies the local load balancer SSL offload. If true start SSL acceleration on all SSL virtual services. (those with a type of HTTPS) This action should be taken only after configuring an SSL certificate for the virtual IP. If false stop SSL acceleration on all SSL virtual services (those with a type of HTTPS). The default value is false.
    • tags- (Optional, Array of Strings)Tags associated with the local load balancer instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.

    Create Lb Resource

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

    Constructor syntax

    new Lb(name: string, args: LbArgs, opts?: CustomResourceOptions);
    @overload
    def Lb(resource_name: str,
           args: LbArgs,
           opts: Optional[ResourceOptions] = None)
    
    @overload
    def Lb(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           connections: Optional[float] = None,
           datacenter: Optional[str] = None,
           dedicated: Optional[bool] = None,
           ha_enabled: Optional[bool] = None,
           lb_id: Optional[str] = None,
           security_certificate_id: Optional[float] = None,
           ssl_offload: Optional[bool] = None,
           tags: Optional[Sequence[str]] = None,
           timeouts: Optional[LbTimeoutsArgs] = None)
    func NewLb(ctx *Context, name string, args LbArgs, opts ...ResourceOption) (*Lb, error)
    public Lb(string name, LbArgs args, CustomResourceOptions? opts = null)
    public Lb(String name, LbArgs args)
    public Lb(String name, LbArgs args, CustomResourceOptions options)
    
    type: ibm:Lb
    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 LbArgs
    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 LbArgs
    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 LbArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LbArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LbArgs
    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 lbResource = new Ibm.Lb("lbResource", new()
    {
        Connections = 0,
        Datacenter = "string",
        Dedicated = false,
        HaEnabled = false,
        LbId = "string",
        SecurityCertificateId = 0,
        SslOffload = false,
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.LbTimeoutsArgs
        {
            Create = "string",
        },
    });
    
    example, err := ibm.NewLb(ctx, "lbResource", &ibm.LbArgs{
    	Connections:           pulumi.Float64(0),
    	Datacenter:            pulumi.String("string"),
    	Dedicated:             pulumi.Bool(false),
    	HaEnabled:             pulumi.Bool(false),
    	LbId:                  pulumi.String("string"),
    	SecurityCertificateId: pulumi.Float64(0),
    	SslOffload:            pulumi.Bool(false),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.LbTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    })
    
    var lbResource = new Lb("lbResource", LbArgs.builder()
        .connections(0)
        .datacenter("string")
        .dedicated(false)
        .haEnabled(false)
        .lbId("string")
        .securityCertificateId(0)
        .sslOffload(false)
        .tags("string")
        .timeouts(LbTimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    lb_resource = ibm.Lb("lbResource",
        connections=0,
        datacenter="string",
        dedicated=False,
        ha_enabled=False,
        lb_id="string",
        security_certificate_id=0,
        ssl_offload=False,
        tags=["string"],
        timeouts={
            "create": "string",
        })
    
    const lbResource = new ibm.Lb("lbResource", {
        connections: 0,
        datacenter: "string",
        dedicated: false,
        haEnabled: false,
        lbId: "string",
        securityCertificateId: 0,
        sslOffload: false,
        tags: ["string"],
        timeouts: {
            create: "string",
        },
    });
    
    type: ibm:Lb
    properties:
        connections: 0
        datacenter: string
        dedicated: false
        haEnabled: false
        lbId: string
        securityCertificateId: 0
        sslOffload: false
        tags:
            - string
        timeouts:
            create: string
    

    Lb 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 Lb resource accepts the following input properties:

    Connections double
    Connections value
    Datacenter string
    Datacenter name info
    Dedicated bool
    Boolena value true if Load balncer is dedicated type
    HaEnabled bool
    true if High availability is enabled
    LbId string
    (String) The unique identifier of the local load balancer.
    SecurityCertificateId double
    Security certificate ID
    SslOffload bool
    boolean value true if SSL offload is enabled
    Tags List<string>
    Tags associated with resource
    Timeouts LbTimeouts
    Connections float64
    Connections value
    Datacenter string
    Datacenter name info
    Dedicated bool
    Boolena value true if Load balncer is dedicated type
    HaEnabled bool
    true if High availability is enabled
    LbId string
    (String) The unique identifier of the local load balancer.
    SecurityCertificateId float64
    Security certificate ID
    SslOffload bool
    boolean value true if SSL offload is enabled
    Tags []string
    Tags associated with resource
    Timeouts LbTimeoutsArgs
    connections Double
    Connections value
    datacenter String
    Datacenter name info
    dedicated Boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled Boolean
    true if High availability is enabled
    lbId String
    (String) The unique identifier of the local load balancer.
    securityCertificateId Double
    Security certificate ID
    sslOffload Boolean
    boolean value true if SSL offload is enabled
    tags List<String>
    Tags associated with resource
    timeouts LbTimeouts
    connections number
    Connections value
    datacenter string
    Datacenter name info
    dedicated boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled boolean
    true if High availability is enabled
    lbId string
    (String) The unique identifier of the local load balancer.
    securityCertificateId number
    Security certificate ID
    sslOffload boolean
    boolean value true if SSL offload is enabled
    tags string[]
    Tags associated with resource
    timeouts LbTimeouts
    connections float
    Connections value
    datacenter str
    Datacenter name info
    dedicated bool
    Boolena value true if Load balncer is dedicated type
    ha_enabled bool
    true if High availability is enabled
    lb_id str
    (String) The unique identifier of the local load balancer.
    security_certificate_id float
    Security certificate ID
    ssl_offload bool
    boolean value true if SSL offload is enabled
    tags Sequence[str]
    Tags associated with resource
    timeouts LbTimeoutsArgs
    connections Number
    Connections value
    datacenter String
    Datacenter name info
    dedicated Boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled Boolean
    true if High availability is enabled
    lbId String
    (String) The unique identifier of the local load balancer.
    securityCertificateId Number
    Security certificate ID
    sslOffload Boolean
    boolean value true if SSL offload is enabled
    tags List<String>
    Tags associated with resource
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Lb resource produces the following output properties:

    Hostname string
    (String) The host name of the local load balancer.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    (String) The IP address of the local load balancer.
    SslEnabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    SubnetId double
    (String) The unique identifier of the subnet associated with the local load balancer.
    Hostname string
    (String) The host name of the local load balancer.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    (String) The IP address of the local load balancer.
    SslEnabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    SubnetId float64
    (String) The unique identifier of the subnet associated with the local load balancer.
    hostname String
    (String) The host name of the local load balancer.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    (String) The IP address of the local load balancer.
    sslEnabled Boolean
    (String) The status of whether the local load balancer provides SSL capability.
    subnetId Double
    (String) The unique identifier of the subnet associated with the local load balancer.
    hostname string
    (String) The host name of the local load balancer.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    (String) The IP address of the local load balancer.
    sslEnabled boolean
    (String) The status of whether the local load balancer provides SSL capability.
    subnetId number
    (String) The unique identifier of the subnet associated with the local load balancer.
    hostname str
    (String) The host name of the local load balancer.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    (String) The IP address of the local load balancer.
    ssl_enabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    subnet_id float
    (String) The unique identifier of the subnet associated with the local load balancer.
    hostname String
    (String) The host name of the local load balancer.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    (String) The IP address of the local load balancer.
    sslEnabled Boolean
    (String) The status of whether the local load balancer provides SSL capability.
    subnetId Number
    (String) The unique identifier of the subnet associated with the local load balancer.

    Look up Existing Lb Resource

    Get an existing Lb 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?: LbState, opts?: CustomResourceOptions): Lb
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connections: Optional[float] = None,
            datacenter: Optional[str] = None,
            dedicated: Optional[bool] = None,
            ha_enabled: Optional[bool] = None,
            hostname: Optional[str] = None,
            ip_address: Optional[str] = None,
            lb_id: Optional[str] = None,
            security_certificate_id: Optional[float] = None,
            ssl_enabled: Optional[bool] = None,
            ssl_offload: Optional[bool] = None,
            subnet_id: Optional[float] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[LbTimeoutsArgs] = None) -> Lb
    func GetLb(ctx *Context, name string, id IDInput, state *LbState, opts ...ResourceOption) (*Lb, error)
    public static Lb Get(string name, Input<string> id, LbState? state, CustomResourceOptions? opts = null)
    public static Lb get(String name, Output<String> id, LbState state, CustomResourceOptions options)
    resources:  _:    type: ibm:Lb    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.
    The following state arguments are supported:
    Connections double
    Connections value
    Datacenter string
    Datacenter name info
    Dedicated bool
    Boolena value true if Load balncer is dedicated type
    HaEnabled bool
    true if High availability is enabled
    Hostname string
    (String) The host name of the local load balancer.
    IpAddress string
    (String) The IP address of the local load balancer.
    LbId string
    (String) The unique identifier of the local load balancer.
    SecurityCertificateId double
    Security certificate ID
    SslEnabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    SslOffload bool
    boolean value true if SSL offload is enabled
    SubnetId double
    (String) The unique identifier of the subnet associated with the local load balancer.
    Tags List<string>
    Tags associated with resource
    Timeouts LbTimeouts
    Connections float64
    Connections value
    Datacenter string
    Datacenter name info
    Dedicated bool
    Boolena value true if Load balncer is dedicated type
    HaEnabled bool
    true if High availability is enabled
    Hostname string
    (String) The host name of the local load balancer.
    IpAddress string
    (String) The IP address of the local load balancer.
    LbId string
    (String) The unique identifier of the local load balancer.
    SecurityCertificateId float64
    Security certificate ID
    SslEnabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    SslOffload bool
    boolean value true if SSL offload is enabled
    SubnetId float64
    (String) The unique identifier of the subnet associated with the local load balancer.
    Tags []string
    Tags associated with resource
    Timeouts LbTimeoutsArgs
    connections Double
    Connections value
    datacenter String
    Datacenter name info
    dedicated Boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled Boolean
    true if High availability is enabled
    hostname String
    (String) The host name of the local load balancer.
    ipAddress String
    (String) The IP address of the local load balancer.
    lbId String
    (String) The unique identifier of the local load balancer.
    securityCertificateId Double
    Security certificate ID
    sslEnabled Boolean
    (String) The status of whether the local load balancer provides SSL capability.
    sslOffload Boolean
    boolean value true if SSL offload is enabled
    subnetId Double
    (String) The unique identifier of the subnet associated with the local load balancer.
    tags List<String>
    Tags associated with resource
    timeouts LbTimeouts
    connections number
    Connections value
    datacenter string
    Datacenter name info
    dedicated boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled boolean
    true if High availability is enabled
    hostname string
    (String) The host name of the local load balancer.
    ipAddress string
    (String) The IP address of the local load balancer.
    lbId string
    (String) The unique identifier of the local load balancer.
    securityCertificateId number
    Security certificate ID
    sslEnabled boolean
    (String) The status of whether the local load balancer provides SSL capability.
    sslOffload boolean
    boolean value true if SSL offload is enabled
    subnetId number
    (String) The unique identifier of the subnet associated with the local load balancer.
    tags string[]
    Tags associated with resource
    timeouts LbTimeouts
    connections float
    Connections value
    datacenter str
    Datacenter name info
    dedicated bool
    Boolena value true if Load balncer is dedicated type
    ha_enabled bool
    true if High availability is enabled
    hostname str
    (String) The host name of the local load balancer.
    ip_address str
    (String) The IP address of the local load balancer.
    lb_id str
    (String) The unique identifier of the local load balancer.
    security_certificate_id float
    Security certificate ID
    ssl_enabled bool
    (String) The status of whether the local load balancer provides SSL capability.
    ssl_offload bool
    boolean value true if SSL offload is enabled
    subnet_id float
    (String) The unique identifier of the subnet associated with the local load balancer.
    tags Sequence[str]
    Tags associated with resource
    timeouts LbTimeoutsArgs
    connections Number
    Connections value
    datacenter String
    Datacenter name info
    dedicated Boolean
    Boolena value true if Load balncer is dedicated type
    haEnabled Boolean
    true if High availability is enabled
    hostname String
    (String) The host name of the local load balancer.
    ipAddress String
    (String) The IP address of the local load balancer.
    lbId String
    (String) The unique identifier of the local load balancer.
    securityCertificateId Number
    Security certificate ID
    sslEnabled Boolean
    (String) The status of whether the local load balancer provides SSL capability.
    sslOffload Boolean
    boolean value true if SSL offload is enabled
    subnetId Number
    (String) The unique identifier of the subnet associated with the local load balancer.
    tags List<String>
    Tags associated with resource
    timeouts Property Map

    Supporting Types

    LbTimeouts, LbTimeoutsArgs

    Create string
    Create string
    create String
    create string
    create str
    create String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud