1. Packages
  2. UpCloud
  3. API Docs
  4. LoadbalancerFrontendTlsConfig
UpCloud v0.1.0 published on Friday, Mar 14, 2025 by UpCloudLtd

upcloud.LoadbalancerFrontendTlsConfig

Explore with Pulumi AI

This resource represents frontend TLS config

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@upcloud/pulumi-upcloud";

const lbFe1Tls1 = new upcloud.LoadbalancerFrontendTlsConfig("lb_fe_1_tls1", {
    frontend: upcloudLoadbalancerFrontend.lbFe1.id,
    name: "lb-fe-1-tls1-test",
    certificateBundle: upcloudLoadbalancerManualCertificateBundle["lb-cb-m1"].id,
});
const config = new pulumi.Config();
const lbZone = config.get("lbZone") || "fi-hel2";
const lbNetwork = new upcloud.Network("lb_network", {
    name: "lb-test-net",
    zone: lbZone,
    ipNetwork: {
        address: "10.0.0.0/24",
        dhcp: true,
        family: "IPv4",
    },
});
const lb_cb_m1 = new upcloud.LoadbalancerManualCertificateBundle("lb-cb-m1", {
    name: "lb-cb-m1-test",
    certificate: "LS0tLS1CRUdJTiBDRVJ...",
    privateKey: "LS0tLS1CRUdJTiBQUkl...",
});
const lbFe1 = new upcloud.LoadbalancerFrontend("lb_fe_1", {
    loadbalancer: upcloudLoadbalancer.lb.id,
    name: "lb-fe-1-test",
    mode: "http",
    port: 8080,
    defaultBackendName: upcloudLoadbalancerBackend.lbBe1.name,
});
const lb = new upcloud.Loadbalancer("lb", {
    configuredStatus: "started",
    name: "lb-test",
    plan: "development",
    zone: lbZone,
    network: upcloudNetwork.lbNetwork.id,
});
const lbBe1 = new upcloud.LoadbalancerBackend("lb_be_1", {
    loadbalancer: upcloudLoadbalancer.lb.id,
    name: "lb-be-1-test",
});
Copy
import pulumi
import pulumi_upcloud as upcloud

lb_fe1_tls1 = upcloud.LoadbalancerFrontendTlsConfig("lb_fe_1_tls1",
    frontend=upcloud_loadbalancer_frontend["lbFe1"]["id"],
    name="lb-fe-1-tls1-test",
    certificate_bundle=upcloud_loadbalancer_manual_certificate_bundle["lb-cb-m1"]["id"])
config = pulumi.Config()
lb_zone = config.get("lbZone")
if lb_zone is None:
    lb_zone = "fi-hel2"
lb_network = upcloud.Network("lb_network",
    name="lb-test-net",
    zone=lb_zone,
    ip_network={
        "address": "10.0.0.0/24",
        "dhcp": True,
        "family": "IPv4",
    })
lb_cb_m1 = upcloud.LoadbalancerManualCertificateBundle("lb-cb-m1",
    name="lb-cb-m1-test",
    certificate="LS0tLS1CRUdJTiBDRVJ...",
    private_key="LS0tLS1CRUdJTiBQUkl...")
lb_fe1 = upcloud.LoadbalancerFrontend("lb_fe_1",
    loadbalancer=upcloud_loadbalancer["lb"]["id"],
    name="lb-fe-1-test",
    mode="http",
    port=8080,
    default_backend_name=upcloud_loadbalancer_backend["lbBe1"]["name"])
lb = upcloud.Loadbalancer("lb",
    configured_status="started",
    name="lb-test",
    plan="development",
    zone=lb_zone,
    network=upcloud_network["lbNetwork"]["id"])
lb_be1 = upcloud.LoadbalancerBackend("lb_be_1",
    loadbalancer=upcloud_loadbalancer["lb"]["id"],
    name="lb-be-1-test")
Copy
package main

import (
	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := upcloud.NewLoadbalancerFrontendTlsConfig(ctx, "lb_fe_1_tls1", &upcloud.LoadbalancerFrontendTlsConfigArgs{
			Frontend:          pulumi.Any(upcloudLoadbalancerFrontend.LbFe1.Id),
			Name:              pulumi.String("lb-fe-1-tls1-test"),
			CertificateBundle: pulumi.Any(upcloudLoadbalancerManualCertificateBundle.LbCbM1.Id),
		})
		if err != nil {
			return err
		}
		cfg := config.New(ctx, "")
		lbZone := "fi-hel2"
		if param := cfg.Get("lbZone"); param != "" {
			lbZone = param
		}
		_, err = upcloud.NewNetwork(ctx, "lb_network", &upcloud.NetworkArgs{
			Name: pulumi.String("lb-test-net"),
			Zone: pulumi.String(lbZone),
			IpNetwork: &upcloud.NetworkIpNetworkArgs{
				Address: pulumi.String("10.0.0.0/24"),
				Dhcp:    pulumi.Bool(true),
				Family:  pulumi.String("IPv4"),
			},
		})
		if err != nil {
			return err
		}
		_, err = upcloud.NewLoadbalancerManualCertificateBundle(ctx, "lb-cb-m1", &upcloud.LoadbalancerManualCertificateBundleArgs{
			Name:        pulumi.String("lb-cb-m1-test"),
			Certificate: pulumi.String("LS0tLS1CRUdJTiBDRVJ..."),
			PrivateKey:  pulumi.String("LS0tLS1CRUdJTiBQUkl..."),
		})
		if err != nil {
			return err
		}
		_, err = upcloud.NewLoadbalancerFrontend(ctx, "lb_fe_1", &upcloud.LoadbalancerFrontendArgs{
			Loadbalancer:       pulumi.Any(upcloudLoadbalancer.Lb.Id),
			Name:               pulumi.String("lb-fe-1-test"),
			Mode:               pulumi.String("http"),
			Port:               pulumi.Int(8080),
			DefaultBackendName: pulumi.Any(upcloudLoadbalancerBackend.LbBe1.Name),
		})
		if err != nil {
			return err
		}
		_, err = upcloud.NewLoadbalancer(ctx, "lb", &upcloud.LoadbalancerArgs{
			ConfiguredStatus: pulumi.String("started"),
			Name:             pulumi.String("lb-test"),
			Plan:             pulumi.String("development"),
			Zone:             pulumi.String(lbZone),
			Network:          pulumi.Any(upcloudNetwork.LbNetwork.Id),
		})
		if err != nil {
			return err
		}
		_, err = upcloud.NewLoadbalancerBackend(ctx, "lb_be_1", &upcloud.LoadbalancerBackendArgs{
			Loadbalancer: pulumi.Any(upcloudLoadbalancer.Lb.Id),
			Name:         pulumi.String("lb-be-1-test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = UpCloud.Pulumi.UpCloud;

return await Deployment.RunAsync(() => 
{
    var lbFe1Tls1 = new UpCloud.LoadbalancerFrontendTlsConfig("lb_fe_1_tls1", new()
    {
        Frontend = upcloudLoadbalancerFrontend.LbFe1.Id,
        Name = "lb-fe-1-tls1-test",
        CertificateBundle = upcloudLoadbalancerManualCertificateBundle.Lb_cb_m1.Id,
    });

    var config = new Config();
    var lbZone = config.Get("lbZone") ?? "fi-hel2";
    var lbNetwork = new UpCloud.Network("lb_network", new()
    {
        Name = "lb-test-net",
        Zone = lbZone,
        IpNetwork = new UpCloud.Inputs.NetworkIpNetworkArgs
        {
            Address = "10.0.0.0/24",
            Dhcp = true,
            Family = "IPv4",
        },
    });

    var lb_cb_m1 = new UpCloud.LoadbalancerManualCertificateBundle("lb-cb-m1", new()
    {
        Name = "lb-cb-m1-test",
        Certificate = "LS0tLS1CRUdJTiBDRVJ...",
        PrivateKey = "LS0tLS1CRUdJTiBQUkl...",
    });

    var lbFe1 = new UpCloud.LoadbalancerFrontend("lb_fe_1", new()
    {
        Loadbalancer = upcloudLoadbalancer.Lb.Id,
        Name = "lb-fe-1-test",
        Mode = "http",
        Port = 8080,
        DefaultBackendName = upcloudLoadbalancerBackend.LbBe1.Name,
    });

    var lb = new UpCloud.Loadbalancer("lb", new()
    {
        ConfiguredStatus = "started",
        Name = "lb-test",
        Plan = "development",
        Zone = lbZone,
        Network = upcloudNetwork.LbNetwork.Id,
    });

    var lbBe1 = new UpCloud.LoadbalancerBackend("lb_be_1", new()
    {
        Loadbalancer = upcloudLoadbalancer.Lb.Id,
        Name = "lb-be-1-test",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.LoadbalancerFrontendTlsConfig;
import com.pulumi.upcloud.LoadbalancerFrontendTlsConfigArgs;
import com.pulumi.upcloud.Network;
import com.pulumi.upcloud.NetworkArgs;
import com.pulumi.upcloud.inputs.NetworkIpNetworkArgs;
import com.pulumi.upcloud.LoadbalancerManualCertificateBundle;
import com.pulumi.upcloud.LoadbalancerManualCertificateBundleArgs;
import com.pulumi.upcloud.LoadbalancerFrontend;
import com.pulumi.upcloud.LoadbalancerFrontendArgs;
import com.pulumi.upcloud.Loadbalancer;
import com.pulumi.upcloud.LoadbalancerArgs;
import com.pulumi.upcloud.LoadbalancerBackend;
import com.pulumi.upcloud.LoadbalancerBackendArgs;
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) {
        final var config = ctx.config();
        var lbFe1Tls1 = new LoadbalancerFrontendTlsConfig("lbFe1Tls1", LoadbalancerFrontendTlsConfigArgs.builder()
            .frontend(upcloudLoadbalancerFrontend.lbFe1().id())
            .name("lb-fe-1-tls1-test")
            .certificateBundle(upcloudLoadbalancerManualCertificateBundle.lb-cb-m1().id())
            .build());

        final var lbZone = config.get("lbZone").orElse("fi-hel2");
        var lbNetwork = new Network("lbNetwork", NetworkArgs.builder()
            .name("lb-test-net")
            .zone(lbZone)
            .ipNetwork(NetworkIpNetworkArgs.builder()
                .address("10.0.0.0/24")
                .dhcp(true)
                .family("IPv4")
                .build())
            .build());

        var lb_cb_m1 = new LoadbalancerManualCertificateBundle("lb-cb-m1", LoadbalancerManualCertificateBundleArgs.builder()
            .name("lb-cb-m1-test")
            .certificate("LS0tLS1CRUdJTiBDRVJ...")
            .privateKey("LS0tLS1CRUdJTiBQUkl...")
            .build());

        var lbFe1 = new LoadbalancerFrontend("lbFe1", LoadbalancerFrontendArgs.builder()
            .loadbalancer(upcloudLoadbalancer.lb().id())
            .name("lb-fe-1-test")
            .mode("http")
            .port(8080)
            .defaultBackendName(upcloudLoadbalancerBackend.lbBe1().name())
            .build());

        var lb = new Loadbalancer("lb", LoadbalancerArgs.builder()
            .configuredStatus("started")
            .name("lb-test")
            .plan("development")
            .zone(lbZone)
            .network(upcloudNetwork.lbNetwork().id())
            .build());

        var lbBe1 = new LoadbalancerBackend("lbBe1", LoadbalancerBackendArgs.builder()
            .loadbalancer(upcloudLoadbalancer.lb().id())
            .name("lb-be-1-test")
            .build());

    }
}
Copy
configuration:
  lbZone:
    type: string
    default: fi-hel2
resources:
  lbFe1Tls1:
    type: upcloud:LoadbalancerFrontendTlsConfig
    name: lb_fe_1_tls1
    properties:
      frontend: ${upcloudLoadbalancerFrontend.lbFe1.id}
      name: lb-fe-1-tls1-test
      certificateBundle: ${upcloudLoadbalancerManualCertificateBundle"lb-cb-m1"[%!s(MISSING)].id}
  lbNetwork:
    type: upcloud:Network
    name: lb_network
    properties:
      name: lb-test-net
      zone: ${lbZone}
      ipNetwork:
        address: 10.0.0.0/24
        dhcp: true
        family: IPv4
  lb-cb-m1:
    type: upcloud:LoadbalancerManualCertificateBundle
    properties:
      name: lb-cb-m1-test
      certificate: LS0tLS1CRUdJTiBDRVJ...
      privateKey: LS0tLS1CRUdJTiBQUkl...
  lbFe1:
    type: upcloud:LoadbalancerFrontend
    name: lb_fe_1
    properties:
      loadbalancer: ${upcloudLoadbalancer.lb.id}
      name: lb-fe-1-test
      mode: http
      port: 8080
      defaultBackendName: ${upcloudLoadbalancerBackend.lbBe1.name}
  lb:
    type: upcloud:Loadbalancer
    properties:
      configuredStatus: started
      name: lb-test
      plan: development
      zone: ${lbZone}
      network: ${upcloudNetwork.lbNetwork.id}
  lbBe1:
    type: upcloud:LoadbalancerBackend
    name: lb_be_1
    properties:
      loadbalancer: ${upcloudLoadbalancer.lb.id}
      name: lb-be-1-test
Copy

Create LoadbalancerFrontendTlsConfig Resource

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

Constructor syntax

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

@overload
def LoadbalancerFrontendTlsConfig(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  certificate_bundle: Optional[str] = None,
                                  frontend: Optional[str] = None,
                                  name: Optional[str] = None)
func NewLoadbalancerFrontendTlsConfig(ctx *Context, name string, args LoadbalancerFrontendTlsConfigArgs, opts ...ResourceOption) (*LoadbalancerFrontendTlsConfig, error)
public LoadbalancerFrontendTlsConfig(string name, LoadbalancerFrontendTlsConfigArgs args, CustomResourceOptions? opts = null)
public LoadbalancerFrontendTlsConfig(String name, LoadbalancerFrontendTlsConfigArgs args)
public LoadbalancerFrontendTlsConfig(String name, LoadbalancerFrontendTlsConfigArgs args, CustomResourceOptions options)
type: upcloud:LoadbalancerFrontendTlsConfig
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. LoadbalancerFrontendTlsConfigArgs
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. LoadbalancerFrontendTlsConfigArgs
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. LoadbalancerFrontendTlsConfigArgs
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. LoadbalancerFrontendTlsConfigArgs
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. LoadbalancerFrontendTlsConfigArgs
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 loadbalancerFrontendTlsConfigResource = new UpCloud.LoadbalancerFrontendTlsConfig("loadbalancerFrontendTlsConfigResource", new()
{
    CertificateBundle = "string",
    Frontend = "string",
    Name = "string",
});
Copy
example, err := upcloud.NewLoadbalancerFrontendTlsConfig(ctx, "loadbalancerFrontendTlsConfigResource", &upcloud.LoadbalancerFrontendTlsConfigArgs{
	CertificateBundle: pulumi.String("string"),
	Frontend:          pulumi.String("string"),
	Name:              pulumi.String("string"),
})
Copy
var loadbalancerFrontendTlsConfigResource = new LoadbalancerFrontendTlsConfig("loadbalancerFrontendTlsConfigResource", LoadbalancerFrontendTlsConfigArgs.builder()
    .certificateBundle("string")
    .frontend("string")
    .name("string")
    .build());
Copy
loadbalancer_frontend_tls_config_resource = upcloud.LoadbalancerFrontendTlsConfig("loadbalancerFrontendTlsConfigResource",
    certificate_bundle="string",
    frontend="string",
    name="string")
Copy
const loadbalancerFrontendTlsConfigResource = new upcloud.LoadbalancerFrontendTlsConfig("loadbalancerFrontendTlsConfigResource", {
    certificateBundle: "string",
    frontend: "string",
    name: "string",
});
Copy
type: upcloud:LoadbalancerFrontendTlsConfig
properties:
    certificateBundle: string
    frontend: string
    name: string
Copy

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

CertificateBundle This property is required. string
Reference to certificate bundle ID.
Frontend This property is required. string
ID of the load balancer frontend to which the TLS config is connected.
Name string
The name of the TLS config. Must be unique within customer account.
CertificateBundle This property is required. string
Reference to certificate bundle ID.
Frontend This property is required. string
ID of the load balancer frontend to which the TLS config is connected.
Name string
The name of the TLS config. Must be unique within customer account.
certificateBundle This property is required. String
Reference to certificate bundle ID.
frontend This property is required. String
ID of the load balancer frontend to which the TLS config is connected.
name String
The name of the TLS config. Must be unique within customer account.
certificateBundle This property is required. string
Reference to certificate bundle ID.
frontend This property is required. string
ID of the load balancer frontend to which the TLS config is connected.
name string
The name of the TLS config. Must be unique within customer account.
certificate_bundle This property is required. str
Reference to certificate bundle ID.
frontend This property is required. str
ID of the load balancer frontend to which the TLS config is connected.
name str
The name of the TLS config. Must be unique within customer account.
certificateBundle This property is required. String
Reference to certificate bundle ID.
frontend This property is required. String
ID of the load balancer frontend to which the TLS config is connected.
name String
The name of the TLS config. Must be unique within customer account.

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadbalancerFrontendTlsConfig 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 LoadbalancerFrontendTlsConfig Resource

Get an existing LoadbalancerFrontendTlsConfig 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?: LoadbalancerFrontendTlsConfigState, opts?: CustomResourceOptions): LoadbalancerFrontendTlsConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate_bundle: Optional[str] = None,
        frontend: Optional[str] = None,
        name: Optional[str] = None) -> LoadbalancerFrontendTlsConfig
func GetLoadbalancerFrontendTlsConfig(ctx *Context, name string, id IDInput, state *LoadbalancerFrontendTlsConfigState, opts ...ResourceOption) (*LoadbalancerFrontendTlsConfig, error)
public static LoadbalancerFrontendTlsConfig Get(string name, Input<string> id, LoadbalancerFrontendTlsConfigState? state, CustomResourceOptions? opts = null)
public static LoadbalancerFrontendTlsConfig get(String name, Output<String> id, LoadbalancerFrontendTlsConfigState state, CustomResourceOptions options)
resources:  _:    type: upcloud:LoadbalancerFrontendTlsConfig    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:
CertificateBundle string
Reference to certificate bundle ID.
Frontend string
ID of the load balancer frontend to which the TLS config is connected.
Name string
The name of the TLS config. Must be unique within customer account.
CertificateBundle string
Reference to certificate bundle ID.
Frontend string
ID of the load balancer frontend to which the TLS config is connected.
Name string
The name of the TLS config. Must be unique within customer account.
certificateBundle String
Reference to certificate bundle ID.
frontend String
ID of the load balancer frontend to which the TLS config is connected.
name String
The name of the TLS config. Must be unique within customer account.
certificateBundle string
Reference to certificate bundle ID.
frontend string
ID of the load balancer frontend to which the TLS config is connected.
name string
The name of the TLS config. Must be unique within customer account.
certificate_bundle str
Reference to certificate bundle ID.
frontend str
ID of the load balancer frontend to which the TLS config is connected.
name str
The name of the TLS config. Must be unique within customer account.
certificateBundle String
Reference to certificate bundle ID.
frontend String
ID of the load balancer frontend to which the TLS config is connected.
name String
The name of the TLS config. Must be unique within customer account.

Package Details

Repository
upcloud UpCloudLtd/pulumi-upcloud
License
Apache-2.0
Notes
This Pulumi package is based on the upcloud Terraform Provider.