ibm.LbaasHealthMonitor
Explore with Pulumi AI
Create, delete, and update a health monitor configuration of the load balancer. For more information, about health monitor of a load balancer as a service, see monitoring and managing your service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const lbaas = new ibm.Lbaas("lbaas", {
description: "delete this",
subnets: [1511875],
protocols: [
{
frontendProtocol: "HTTPS",
frontendPort: 443,
backendProtocol: "HTTP",
backendPort: 80,
loadBalancingMethod: "round_robin",
tlsCertificateId: 11670,
},
{
frontendProtocol: "HTTP",
frontendPort: 80,
backendProtocol: "HTTP",
backendPort: 80,
loadBalancingMethod: "round_robin",
},
],
});
const lbaasHm = new ibm.LbaasHealthMonitor("lbaasHm", {
protocol: lbaas.healthMonitors.apply(healthMonitors => healthMonitors[0].protocol),
port: lbaas.healthMonitors.apply(healthMonitors => healthMonitors[0].port),
timeout: 3,
interval: 5,
maxRetries: 6,
urlPath: "/",
lbaasId: lbaas.lbaasId,
monitorId: lbaas.healthMonitors.apply(healthMonitors => healthMonitors[0].monitorId),
});
import pulumi
import pulumi_ibm as ibm
lbaas = ibm.Lbaas("lbaas",
description="delete this",
subnets=[1511875],
protocols=[
{
"frontend_protocol": "HTTPS",
"frontend_port": 443,
"backend_protocol": "HTTP",
"backend_port": 80,
"load_balancing_method": "round_robin",
"tls_certificate_id": 11670,
},
{
"frontend_protocol": "HTTP",
"frontend_port": 80,
"backend_protocol": "HTTP",
"backend_port": 80,
"load_balancing_method": "round_robin",
},
])
lbaas_hm = ibm.LbaasHealthMonitor("lbaasHm",
protocol=lbaas.health_monitors[0].protocol,
port=lbaas.health_monitors[0].port,
timeout=3,
interval=5,
max_retries=6,
url_path="/",
lbaas_id=lbaas.lbaas_id,
monitor_id=lbaas.health_monitors[0].monitor_id)
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 {
lbaas, err := ibm.NewLbaas(ctx, "lbaas", &ibm.LbaasArgs{
Description: pulumi.String("delete this"),
Subnets: pulumi.Float64Array{
pulumi.Float64(1511875),
},
Protocols: ibm.LbaasProtocolArray{
&ibm.LbaasProtocolArgs{
FrontendProtocol: pulumi.String("HTTPS"),
FrontendPort: pulumi.Float64(443),
BackendProtocol: pulumi.String("HTTP"),
BackendPort: pulumi.Float64(80),
LoadBalancingMethod: pulumi.String("round_robin"),
TlsCertificateId: pulumi.Float64(11670),
},
&ibm.LbaasProtocolArgs{
FrontendProtocol: pulumi.String("HTTP"),
FrontendPort: pulumi.Float64(80),
BackendProtocol: pulumi.String("HTTP"),
BackendPort: pulumi.Float64(80),
LoadBalancingMethod: pulumi.String("round_robin"),
},
},
})
if err != nil {
return err
}
_, err = ibm.NewLbaasHealthMonitor(ctx, "lbaasHm", &ibm.LbaasHealthMonitorArgs{
Protocol: pulumi.String(lbaas.HealthMonitors.ApplyT(func(healthMonitors []ibm.LbaasHealthMonitorType) (*string, error) {
return &healthMonitors[0].Protocol, nil
}).(pulumi.StringPtrOutput)),
Port: pulumi.Float64(lbaas.HealthMonitors.ApplyT(func(healthMonitors []ibm.LbaasHealthMonitorType) (*float64, error) {
return &healthMonitors[0].Port, nil
}).(pulumi.Float64PtrOutput)),
Timeout: pulumi.Float64(3),
Interval: pulumi.Float64(5),
MaxRetries: pulumi.Float64(6),
UrlPath: pulumi.String("/"),
LbaasId: lbaas.LbaasId,
MonitorId: pulumi.String(lbaas.HealthMonitors.ApplyT(func(healthMonitors []ibm.LbaasHealthMonitorType) (*string, error) {
return &healthMonitors[0].MonitorId, nil
}).(pulumi.StringPtrOutput)),
})
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 lbaas = new Ibm.Lbaas("lbaas", new()
{
Description = "delete this",
Subnets = new[]
{
1511875,
},
Protocols = new[]
{
new Ibm.Inputs.LbaasProtocolArgs
{
FrontendProtocol = "HTTPS",
FrontendPort = 443,
BackendProtocol = "HTTP",
BackendPort = 80,
LoadBalancingMethod = "round_robin",
TlsCertificateId = 11670,
},
new Ibm.Inputs.LbaasProtocolArgs
{
FrontendProtocol = "HTTP",
FrontendPort = 80,
BackendProtocol = "HTTP",
BackendPort = 80,
LoadBalancingMethod = "round_robin",
},
},
});
var lbaasHm = new Ibm.LbaasHealthMonitor("lbaasHm", new()
{
Protocol = lbaas.HealthMonitors.Apply(healthMonitors => healthMonitors[0].Protocol),
Port = lbaas.HealthMonitors.Apply(healthMonitors => healthMonitors[0].Port),
Timeout = 3,
Interval = 5,
MaxRetries = 6,
UrlPath = "/",
LbaasId = lbaas.LbaasId,
MonitorId = lbaas.HealthMonitors.Apply(healthMonitors => healthMonitors[0].MonitorId),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.Lbaas;
import com.pulumi.ibm.LbaasArgs;
import com.pulumi.ibm.inputs.LbaasProtocolArgs;
import com.pulumi.ibm.LbaasHealthMonitor;
import com.pulumi.ibm.LbaasHealthMonitorArgs;
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 lbaas = new Lbaas("lbaas", LbaasArgs.builder()
.description("delete this")
.subnets(1511875)
.protocols(
LbaasProtocolArgs.builder()
.frontendProtocol("HTTPS")
.frontendPort(443)
.backendProtocol("HTTP")
.backendPort(80)
.loadBalancingMethod("round_robin")
.tlsCertificateId(11670)
.build(),
LbaasProtocolArgs.builder()
.frontendProtocol("HTTP")
.frontendPort(80)
.backendProtocol("HTTP")
.backendPort(80)
.loadBalancingMethod("round_robin")
.build())
.build());
var lbaasHm = new LbaasHealthMonitor("lbaasHm", LbaasHealthMonitorArgs.builder()
.protocol(lbaas.healthMonitors().applyValue(healthMonitors -> healthMonitors[0].protocol()))
.port(lbaas.healthMonitors().applyValue(healthMonitors -> healthMonitors[0].port()))
.timeout(3)
.interval(5)
.maxRetries(6)
.urlPath("/")
.lbaasId(lbaas.lbaasId())
.monitorId(lbaas.healthMonitors().applyValue(healthMonitors -> healthMonitors[0].monitorId()))
.build());
}
}
resources:
lbaas:
type: ibm:Lbaas
properties:
description: delete this
subnets:
- 1.511875e+06
protocols:
- frontendProtocol: HTTPS
frontendPort: 443
backendProtocol: HTTP
backendPort: 80
loadBalancingMethod: round_robin
tlsCertificateId: 11670
- frontendProtocol: HTTP
frontendPort: 80
backendProtocol: HTTP
backendPort: 80
loadBalancingMethod: round_robin
lbaasHm:
type: ibm:LbaasHealthMonitor
properties:
protocol: ${lbaas.healthMonitors[0].protocol}
port: ${lbaas.healthMonitors[0].port}
timeout: 3
interval: 5
maxRetries: 6
urlPath: /
lbaasId: ${lbaas.lbaasId}
monitorId: ${lbaas.healthMonitors[0].monitorId}
Argument reference
Review the argument references that you can specify for your resource.
interval
- (Optional, Integer) Interval in seconds to perform.lbaas_id
- (Required, Forces new resource, String) LBaaS unique identifier.max_retries
- (Optional, Integer) Maximum retries.monitor_id
- (Required, Forces new resource, String)Health Monitor unique identifier. The monitor ID can be imported from either theibm.Lbaas
resource or datasource. For example,ibm_lbaas.lbaas.health_monitors.X.monitor_id
ordata.ibm_lbaas.lbaas.health_monitors.X.monitor_id
.protocol
- (Required, String)The back-end protocol.port
- (Required, Integer) The back-end port.timeout
- (Optional, Integer) Health check methods timeout in.url_path
- (Optional, String) If monitor is HTTP, it specifies the URL path.
Create LbaasHealthMonitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbaasHealthMonitor(name: string, args: LbaasHealthMonitorArgs, opts?: CustomResourceOptions);
@overload
def LbaasHealthMonitor(resource_name: str,
args: LbaasHealthMonitorInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LbaasHealthMonitor(resource_name: str,
opts: Optional[ResourceOptions] = None,
lbaas_id: Optional[str] = None,
monitor_id: Optional[str] = None,
port: Optional[float] = None,
protocol: Optional[str] = None,
interval: Optional[float] = None,
lbaas_health_monitor_id: Optional[str] = None,
max_retries: Optional[float] = None,
timeout: Optional[float] = None,
url_path: Optional[str] = None)
func NewLbaasHealthMonitor(ctx *Context, name string, args LbaasHealthMonitorArgs, opts ...ResourceOption) (*LbaasHealthMonitor, error)
public LbaasHealthMonitor(string name, LbaasHealthMonitorArgs args, CustomResourceOptions? opts = null)
public LbaasHealthMonitor(String name, LbaasHealthMonitorArgs args)
public LbaasHealthMonitor(String name, LbaasHealthMonitorArgs args, CustomResourceOptions options)
type: ibm:LbaasHealthMonitor
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 LbaasHealthMonitorArgs
- 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 LbaasHealthMonitorInitArgs
- 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 LbaasHealthMonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbaasHealthMonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LbaasHealthMonitorArgs
- 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 lbaasHealthMonitorResource = new Ibm.LbaasHealthMonitor("lbaasHealthMonitorResource", new()
{
LbaasId = "string",
MonitorId = "string",
Port = 0,
Protocol = "string",
Interval = 0,
LbaasHealthMonitorId = "string",
MaxRetries = 0,
Timeout = 0,
UrlPath = "string",
});
example, err := ibm.NewLbaasHealthMonitor(ctx, "lbaasHealthMonitorResource", &ibm.LbaasHealthMonitorArgs{
LbaasId: pulumi.String("string"),
MonitorId: pulumi.String("string"),
Port: pulumi.Float64(0),
Protocol: pulumi.String("string"),
Interval: pulumi.Float64(0),
LbaasHealthMonitorId: pulumi.String("string"),
MaxRetries: pulumi.Float64(0),
Timeout: pulumi.Float64(0),
UrlPath: pulumi.String("string"),
})
var lbaasHealthMonitorResource = new LbaasHealthMonitor("lbaasHealthMonitorResource", LbaasHealthMonitorArgs.builder()
.lbaasId("string")
.monitorId("string")
.port(0)
.protocol("string")
.interval(0)
.lbaasHealthMonitorId("string")
.maxRetries(0)
.timeout(0)
.urlPath("string")
.build());
lbaas_health_monitor_resource = ibm.LbaasHealthMonitor("lbaasHealthMonitorResource",
lbaas_id="string",
monitor_id="string",
port=0,
protocol="string",
interval=0,
lbaas_health_monitor_id="string",
max_retries=0,
timeout=0,
url_path="string")
const lbaasHealthMonitorResource = new ibm.LbaasHealthMonitor("lbaasHealthMonitorResource", {
lbaasId: "string",
monitorId: "string",
port: 0,
protocol: "string",
interval: 0,
lbaasHealthMonitorId: "string",
maxRetries: 0,
timeout: 0,
urlPath: "string",
});
type: ibm:LbaasHealthMonitor
properties:
interval: 0
lbaasHealthMonitorId: string
lbaasId: string
maxRetries: 0
monitorId: string
port: 0
protocol: string
timeout: 0
urlPath: string
LbaasHealthMonitor 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 LbaasHealthMonitor resource accepts the following input properties:
- Lbaas
Id string - LBAAS id
- Monitor
Id string - Monitor ID
- Port double
- Port number
- Protocol string
- Protocol value
- Interval double
- Interval value
- Lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - Max
Retries double - Maximum retry counts
- Timeout double
- Timeout in seconds
- Url
Path string - URL Path
- Lbaas
Id string - LBAAS id
- Monitor
Id string - Monitor ID
- Port float64
- Port number
- Protocol string
- Protocol value
- Interval float64
- Interval value
- Lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - Max
Retries float64 - Maximum retry counts
- Timeout float64
- Timeout in seconds
- Url
Path string - URL Path
- lbaas
Id String - LBAAS id
- monitor
Id String - Monitor ID
- port Double
- Port number
- protocol String
- Protocol value
- interval Double
- Interval value
- lbaas
Health StringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - max
Retries Double - Maximum retry counts
- timeout Double
- Timeout in seconds
- url
Path String - URL Path
- lbaas
Id string - LBAAS id
- monitor
Id string - Monitor ID
- port number
- Port number
- protocol string
- Protocol value
- interval number
- Interval value
- lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - max
Retries number - Maximum retry counts
- timeout number
- Timeout in seconds
- url
Path string - URL Path
- lbaas_
id str - LBAAS id
- monitor_
id str - Monitor ID
- port float
- Port number
- protocol str
- Protocol value
- interval float
- Interval value
- lbaas_
health_ strmonitor_ id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - max_
retries float - Maximum retry counts
- timeout float
- Timeout in seconds
- url_
path str - URL Path
- lbaas
Id String - LBAAS id
- monitor
Id String - Monitor ID
- port Number
- Port number
- protocol String
- Protocol value
- interval Number
- Interval value
- lbaas
Health StringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - max
Retries Number - Maximum retry counts
- timeout Number
- Timeout in seconds
- url
Path String - URL Path
Outputs
All input properties are implicitly available as output properties. Additionally, the LbaasHealthMonitor 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 LbaasHealthMonitor Resource
Get an existing LbaasHealthMonitor 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?: LbaasHealthMonitorState, opts?: CustomResourceOptions): LbaasHealthMonitor
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[float] = None,
lbaas_health_monitor_id: Optional[str] = None,
lbaas_id: Optional[str] = None,
max_retries: Optional[float] = None,
monitor_id: Optional[str] = None,
port: Optional[float] = None,
protocol: Optional[str] = None,
timeout: Optional[float] = None,
url_path: Optional[str] = None) -> LbaasHealthMonitor
func GetLbaasHealthMonitor(ctx *Context, name string, id IDInput, state *LbaasHealthMonitorState, opts ...ResourceOption) (*LbaasHealthMonitor, error)
public static LbaasHealthMonitor Get(string name, Input<string> id, LbaasHealthMonitorState? state, CustomResourceOptions? opts = null)
public static LbaasHealthMonitor get(String name, Output<String> id, LbaasHealthMonitorState state, CustomResourceOptions options)
resources: _: type: ibm:LbaasHealthMonitor 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.
- Interval double
- Interval value
- Lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - Lbaas
Id string - LBAAS id
- Max
Retries double - Maximum retry counts
- Monitor
Id string - Monitor ID
- Port double
- Port number
- Protocol string
- Protocol value
- Timeout double
- Timeout in seconds
- Url
Path string - URL Path
- Interval float64
- Interval value
- Lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - Lbaas
Id string - LBAAS id
- Max
Retries float64 - Maximum retry counts
- Monitor
Id string - Monitor ID
- Port float64
- Port number
- Protocol string
- Protocol value
- Timeout float64
- Timeout in seconds
- Url
Path string - URL Path
- interval Double
- Interval value
- lbaas
Health StringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - lbaas
Id String - LBAAS id
- max
Retries Double - Maximum retry counts
- monitor
Id String - Monitor ID
- port Double
- Port number
- protocol String
- Protocol value
- timeout Double
- Timeout in seconds
- url
Path String - URL Path
- interval number
- Interval value
- lbaas
Health stringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - lbaas
Id string - LBAAS id
- max
Retries number - Maximum retry counts
- monitor
Id string - Monitor ID
- port number
- Port number
- protocol string
- Protocol value
- timeout number
- Timeout in seconds
- url
Path string - URL Path
- interval float
- Interval value
- lbaas_
health_ strmonitor_ id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - lbaas_
id str - LBAAS id
- max_
retries float - Maximum retry counts
- monitor_
id str - Monitor ID
- port float
- Port number
- protocol str
- Protocol value
- timeout float
- Timeout in seconds
- url_
path str - URL Path
- interval Number
- Interval value
- lbaas
Health StringMonitor Id - (String) The unique identifier of the LBaaS health monitor resource. The ID is composed of
<lbaas_id>/<monitor_id>
. - lbaas
Id String - LBAAS id
- max
Retries Number - Maximum retry counts
- monitor
Id String - Monitor ID
- port Number
- Port number
- protocol String
- Protocol value
- timeout Number
- Timeout in seconds
- url
Path String - URL Path
Import
The ibm_lbaas_health_monitor
resource can be imported by using LBaaS ID and monitor ID.
Example
$ pulumi import ibm:index/lbaasHealthMonitor:LbaasHealthMonitor example 988-454f-45vf-454542/d343f-f44r-wer3-fe
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.