ibm.Lb
Explore with Pulumi AI
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. NoteTags
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)
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
- Ha
Enabled bool - true if High availability is enabled
- Lb
Id string - (String) The unique identifier of the local load balancer.
- Security
Certificate doubleId - Security certificate ID
- Ssl
Offload bool - boolean value true if SSL offload is enabled
- List<string>
- Tags associated with resource
- Timeouts
Lb
Timeouts
- Connections float64
- Connections value
- Datacenter string
- 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 string - (String) The unique identifier of the local load balancer.
- Security
Certificate float64Id - Security certificate ID
- Ssl
Offload bool - boolean value true if SSL offload is enabled
- []string
- Tags associated with resource
- Timeouts
Lb
Timeouts Args
- connections Double
- Connections value
- datacenter String
- Datacenter name info
- dedicated Boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled Boolean - true if High availability is enabled
- lb
Id String - (String) The unique identifier of the local load balancer.
- security
Certificate DoubleId - Security certificate ID
- ssl
Offload Boolean - boolean value true if SSL offload is enabled
- List<String>
- Tags associated with resource
- timeouts
Lb
Timeouts
- connections number
- Connections value
- datacenter string
- Datacenter name info
- dedicated boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled boolean - true if High availability is enabled
- lb
Id string - (String) The unique identifier of the local load balancer.
- security
Certificate numberId - Security certificate ID
- ssl
Offload boolean - boolean value true if SSL offload is enabled
- string[]
- Tags associated with resource
- timeouts
Lb
Timeouts
- 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_ floatid - Security certificate ID
- ssl_
offload bool - boolean value true if SSL offload is enabled
- Sequence[str]
- Tags associated with resource
- timeouts
Lb
Timeouts Args
- connections Number
- Connections value
- datacenter String
- Datacenter name info
- dedicated Boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled Boolean - true if High availability is enabled
- lb
Id String - (String) The unique identifier of the local load balancer.
- security
Certificate NumberId - Security certificate ID
- ssl
Offload Boolean - boolean value true if SSL offload is enabled
- 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.
- Ip
Address string - (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 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.
- Ip
Address string - (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 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.
- ip
Address String - (String) The IP address of the local load balancer.
- ssl
Enabled Boolean - (String) The status of whether the local load balancer provides SSL capability.
- subnet
Id 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.
- ip
Address string - (String) The IP address of the local load balancer.
- ssl
Enabled boolean - (String) The status of whether the local load balancer provides SSL capability.
- subnet
Id 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.
- ip
Address String - (String) The IP address of the local load balancer.
- ssl
Enabled Boolean - (String) The status of whether the local load balancer provides SSL capability.
- subnet
Id 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.
- Connections double
- Connections value
- Datacenter string
- Datacenter name info
- Dedicated bool
- Boolena value true if Load balncer is dedicated type
- Ha
Enabled bool - true if High availability is enabled
- Hostname string
- (String) The host name of the local load balancer.
- Ip
Address string - (String) The IP address of the local load balancer.
- Lb
Id string - (String) The unique identifier of the local load balancer.
- Security
Certificate doubleId - 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 double - (String) The unique identifier of the subnet associated with the local load balancer.
- List<string>
- Tags associated with resource
- Timeouts
Lb
Timeouts
- Connections float64
- Connections value
- Datacenter string
- Datacenter name info
- Dedicated bool
- Boolena value true if Load balncer is dedicated type
- Ha
Enabled bool - true if High availability is enabled
- Hostname string
- (String) The host name of the local load balancer.
- Ip
Address string - (String) The IP address of the local load balancer.
- Lb
Id string - (String) The unique identifier of the local load balancer.
- Security
Certificate float64Id - 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 float64 - (String) The unique identifier of the subnet associated with the local load balancer.
- []string
- Tags associated with resource
- Timeouts
Lb
Timeouts Args
- connections Double
- Connections value
- datacenter String
- Datacenter name info
- dedicated Boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled Boolean - true if High availability is enabled
- hostname String
- (String) The host name of the local load balancer.
- ip
Address String - (String) The IP address of the local load balancer.
- lb
Id String - (String) The unique identifier of the local load balancer.
- security
Certificate DoubleId - Security certificate ID
- ssl
Enabled Boolean - (String) The status of whether the local load balancer provides SSL capability.
- ssl
Offload Boolean - boolean value true if SSL offload is enabled
- subnet
Id Double - (String) The unique identifier of the subnet associated with the local load balancer.
- List<String>
- Tags associated with resource
- timeouts
Lb
Timeouts
- connections number
- Connections value
- datacenter string
- Datacenter name info
- dedicated boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled boolean - true if High availability is enabled
- hostname string
- (String) The host name of the local load balancer.
- ip
Address string - (String) The IP address of the local load balancer.
- lb
Id string - (String) The unique identifier of the local load balancer.
- security
Certificate numberId - Security certificate ID
- ssl
Enabled boolean - (String) The status of whether the local load balancer provides SSL capability.
- ssl
Offload boolean - boolean value true if SSL offload is enabled
- subnet
Id number - (String) The unique identifier of the subnet associated with the local load balancer.
- string[]
- Tags associated with resource
- timeouts
Lb
Timeouts
- 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_ floatid - 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.
- Sequence[str]
- Tags associated with resource
- timeouts
Lb
Timeouts Args
- connections Number
- Connections value
- datacenter String
- Datacenter name info
- dedicated Boolean
- Boolena value true if Load balncer is dedicated type
- ha
Enabled Boolean - true if High availability is enabled
- hostname String
- (String) The host name of the local load balancer.
- ip
Address String - (String) The IP address of the local load balancer.
- lb
Id String - (String) The unique identifier of the local load balancer.
- security
Certificate NumberId - Security certificate ID
- ssl
Enabled Boolean - (String) The status of whether the local load balancer provides SSL capability.
- ssl
Offload Boolean - boolean value true if SSL offload is enabled
- subnet
Id Number - (String) The unique identifier of the subnet associated with the local load balancer.
- 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.