1. Packages
  2. Ucloud Provider
  3. API Docs
  4. LbSsl
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.LbSsl

Explore with Pulumi AI

Provides a Load Balancer SSL certificate resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as ucloud from "@pulumi/ucloud";

const _default = new ucloud.LbSsl("default", {
    privateKey: fs.readFileSync("private.key", "utf8"),
    userCert: fs.readFileSync("user.crt", "utf8"),
    caCert: fs.readFileSync("ca.crt", "utf8"),
});
Copy
import pulumi
import pulumi_ucloud as ucloud

default = ucloud.LbSsl("default",
    private_key=(lambda path: open(path).read())("private.key"),
    user_cert=(lambda path: open(path).read())("user.crt"),
    ca_cert=(lambda path: open(path).read())("ca.crt"))
Copy
package main

import (
	"os"

	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := os.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ucloud.NewLbSsl(ctx, "default", &ucloud.LbSslArgs{
			PrivateKey: pulumi.String(readFileOrPanic("private.key")),
			UserCert:   pulumi.String(readFileOrPanic("user.crt")),
			CaCert:     pulumi.String(readFileOrPanic("ca.crt")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;

return await Deployment.RunAsync(() => 
{
    var @default = new Ucloud.LbSsl("default", new()
    {
        PrivateKey = File.ReadAllText("private.key"),
        UserCert = File.ReadAllText("user.crt"),
        CaCert = File.ReadAllText("ca.crt"),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.LbSsl;
import com.pulumi.ucloud.LbSslArgs;
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 default_ = new LbSsl("default", LbSslArgs.builder()
            .privateKey(Files.readString(Paths.get("private.key")))
            .userCert(Files.readString(Paths.get("user.crt")))
            .caCert(Files.readString(Paths.get("ca.crt")))
            .build());

    }
}
Copy
resources:
  default:
    type: ucloud:LbSsl
    properties:
      privateKey:
        fn::readFile: private.key
      userCert:
        fn::readFile: user.crt
      caCert:
        fn::readFile: ca.crt
Copy

Create LbSsl Resource

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

Constructor syntax

new LbSsl(name: string, args: LbSslArgs, opts?: CustomResourceOptions);
@overload
def LbSsl(resource_name: str,
          args: LbSslArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def LbSsl(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          private_key: Optional[str] = None,
          user_cert: Optional[str] = None,
          ca_cert: Optional[str] = None,
          lb_ssl_id: Optional[str] = None,
          name: Optional[str] = None)
func NewLbSsl(ctx *Context, name string, args LbSslArgs, opts ...ResourceOption) (*LbSsl, error)
public LbSsl(string name, LbSslArgs args, CustomResourceOptions? opts = null)
public LbSsl(String name, LbSslArgs args)
public LbSsl(String name, LbSslArgs args, CustomResourceOptions options)
type: ucloud:LbSsl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LbSslArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LbSslArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LbSslArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LbSslArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LbSslArgs
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 lbSslResource = new Ucloud.LbSsl("lbSslResource", new()
{
    PrivateKey = "string",
    UserCert = "string",
    CaCert = "string",
    LbSslId = "string",
    Name = "string",
});
Copy
example, err := ucloud.NewLbSsl(ctx, "lbSslResource", &ucloud.LbSslArgs{
	PrivateKey: pulumi.String("string"),
	UserCert:   pulumi.String("string"),
	CaCert:     pulumi.String("string"),
	LbSslId:    pulumi.String("string"),
	Name:       pulumi.String("string"),
})
Copy
var lbSslResource = new LbSsl("lbSslResource", LbSslArgs.builder()
    .privateKey("string")
    .userCert("string")
    .caCert("string")
    .lbSslId("string")
    .name("string")
    .build());
Copy
lb_ssl_resource = ucloud.LbSsl("lbSslResource",
    private_key="string",
    user_cert="string",
    ca_cert="string",
    lb_ssl_id="string",
    name="string")
Copy
const lbSslResource = new ucloud.LbSsl("lbSslResource", {
    privateKey: "string",
    userCert: "string",
    caCert: "string",
    lbSslId: "string",
    name: "string",
});
Copy
type: ucloud:LbSsl
properties:
    caCert: string
    lbSslId: string
    name: string
    privateKey: string
    userCert: string
Copy

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

PrivateKey This property is required. string
The content of the private key about ssl certificate.
UserCert This property is required. string
The content of the user certificate about ssl certificate.


CaCert string
The content of the CA certificate about ssl certificate.
LbSslId string
The ID of the resource lb ssl.
Name string
PrivateKey This property is required. string
The content of the private key about ssl certificate.
UserCert This property is required. string
The content of the user certificate about ssl certificate.


CaCert string
The content of the CA certificate about ssl certificate.
LbSslId string
The ID of the resource lb ssl.
Name string
privateKey This property is required. String
The content of the private key about ssl certificate.
userCert This property is required. String
The content of the user certificate about ssl certificate.


caCert String
The content of the CA certificate about ssl certificate.
lbSslId String
The ID of the resource lb ssl.
name String
privateKey This property is required. string
The content of the private key about ssl certificate.
userCert This property is required. string
The content of the user certificate about ssl certificate.


caCert string
The content of the CA certificate about ssl certificate.
lbSslId string
The ID of the resource lb ssl.
name string
private_key This property is required. str
The content of the private key about ssl certificate.
user_cert This property is required. str
The content of the user certificate about ssl certificate.


ca_cert str
The content of the CA certificate about ssl certificate.
lb_ssl_id str
The ID of the resource lb ssl.
name str
privateKey This property is required. String
The content of the private key about ssl certificate.
userCert This property is required. String
The content of the user certificate about ssl certificate.


caCert String
The content of the CA certificate about ssl certificate.
lbSslId String
The ID of the resource lb ssl.
name String

Outputs

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

CreateTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
Id string
The provider-assigned unique ID for this managed resource.
CreateTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
Id string
The provider-assigned unique ID for this managed resource.
createTime String
The time of creation for lb ssl, formatted in RFC3339 time string.
id String
The provider-assigned unique ID for this managed resource.
createTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
id string
The provider-assigned unique ID for this managed resource.
create_time str
The time of creation for lb ssl, formatted in RFC3339 time string.
id str
The provider-assigned unique ID for this managed resource.
createTime String
The time of creation for lb ssl, formatted in RFC3339 time string.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LbSsl Resource

Get an existing LbSsl 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?: LbSslState, opts?: CustomResourceOptions): LbSsl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ca_cert: Optional[str] = None,
        create_time: Optional[str] = None,
        lb_ssl_id: Optional[str] = None,
        name: Optional[str] = None,
        private_key: Optional[str] = None,
        user_cert: Optional[str] = None) -> LbSsl
func GetLbSsl(ctx *Context, name string, id IDInput, state *LbSslState, opts ...ResourceOption) (*LbSsl, error)
public static LbSsl Get(string name, Input<string> id, LbSslState? state, CustomResourceOptions? opts = null)
public static LbSsl get(String name, Output<String> id, LbSslState state, CustomResourceOptions options)
resources:  _:    type: ucloud:LbSsl    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CaCert string
The content of the CA certificate about ssl certificate.
CreateTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
LbSslId string
The ID of the resource lb ssl.
Name string
PrivateKey string
The content of the private key about ssl certificate.
UserCert string
The content of the user certificate about ssl certificate.


CaCert string
The content of the CA certificate about ssl certificate.
CreateTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
LbSslId string
The ID of the resource lb ssl.
Name string
PrivateKey string
The content of the private key about ssl certificate.
UserCert string
The content of the user certificate about ssl certificate.


caCert String
The content of the CA certificate about ssl certificate.
createTime String
The time of creation for lb ssl, formatted in RFC3339 time string.
lbSslId String
The ID of the resource lb ssl.
name String
privateKey String
The content of the private key about ssl certificate.
userCert String
The content of the user certificate about ssl certificate.


caCert string
The content of the CA certificate about ssl certificate.
createTime string
The time of creation for lb ssl, formatted in RFC3339 time string.
lbSslId string
The ID of the resource lb ssl.
name string
privateKey string
The content of the private key about ssl certificate.
userCert string
The content of the user certificate about ssl certificate.


ca_cert str
The content of the CA certificate about ssl certificate.
create_time str
The time of creation for lb ssl, formatted in RFC3339 time string.
lb_ssl_id str
The ID of the resource lb ssl.
name str
private_key str
The content of the private key about ssl certificate.
user_cert str
The content of the user certificate about ssl certificate.


caCert String
The content of the CA certificate about ssl certificate.
createTime String
The time of creation for lb ssl, formatted in RFC3339 time string.
lbSslId String
The ID of the resource lb ssl.
name String
privateKey String
The content of the private key about ssl certificate.
userCert String
The content of the user certificate about ssl certificate.


Package Details

Repository
ucloud ucloud/terraform-provider-ucloud
License
Notes
This Pulumi package is based on the ucloud Terraform Provider.