Lb

class Lb : KotlinCustomResource

Creates a Lightsail load balancer resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Lb("test", {
name: "test-load-balancer",
healthCheckPath: "/",
instancePort: 80,
tags: {
foo: "bar",
},
});
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Lb("test",
name="test-load-balancer",
health_check_path="/",
instance_port=80,
tags={
"foo": "bar",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.LightSail.Lb("test", new()
{
Name = "test-load-balancer",
HealthCheckPath = "/",
InstancePort = 80,
Tags =
{
{ "foo", "bar" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lightsail.NewLb(ctx, "test", &lightsail.LbArgs{
Name: pulumi.String("test-load-balancer"),
HealthCheckPath: pulumi.String("/"),
InstancePort: pulumi.Int(80),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.Lb;
import com.pulumi.aws.lightsail.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 test = new Lb("test", LbArgs.builder()
.name("test-load-balancer")
.healthCheckPath("/")
.instancePort("80")
.tags(Map.of("foo", "bar"))
.build());
}
}
resources:
test:
type: aws:lightsail:Lb
properties:
name: test-load-balancer
healthCheckPath: /
instancePort: '80'
tags:
foo: bar

Import

Using pulumi import, import aws_lightsail_lb using the name attribute. For example:

$ pulumi import aws:lightsail/lb:Lb test example-load-balancer

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the Lightsail load balancer.

Link copied to clipboard
val createdAt: Output<String>

The timestamp when the load balancer was created.

Link copied to clipboard
val dnsName: Output<String>

The DNS name of the load balancer.

Link copied to clipboard
val healthCheckPath: Output<String>?

The health check path of the load balancer. Default value "/".

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instancePort: Output<Int>

The instance port the load balancer will connect.

Link copied to clipboard
val ipAddressType: Output<String>?
Link copied to clipboard
val name: Output<String>

The name of the Lightsail load balancer.

Link copied to clipboard
val protocol: Output<String>

The protocol of the load balancer.

Link copied to clipboard
val publicPorts: Output<List<Int>>

The public ports of the load balancer.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val supportCode: Output<String>

The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>