UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

109 lines 4.59 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.LoadbalancerFrontendTlsConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource represents frontend TLS config * * ## Example Usage * * ```typescript * 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", * }); * ``` */ class LoadbalancerFrontendTlsConfig extends pulumi.CustomResource { /** * Get an existing LoadbalancerFrontendTlsConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new LoadbalancerFrontendTlsConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of LoadbalancerFrontendTlsConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === LoadbalancerFrontendTlsConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["certificateBundle"] = state ? state.certificateBundle : undefined; resourceInputs["frontend"] = state ? state.frontend : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { const args = argsOrState; if ((!args || args.certificateBundle === undefined) && !opts.urn) { throw new Error("Missing required property 'certificateBundle'"); } if ((!args || args.frontend === undefined) && !opts.urn) { throw new Error("Missing required property 'frontend'"); } resourceInputs["certificateBundle"] = args ? args.certificateBundle : undefined; resourceInputs["frontend"] = args ? args.frontend : undefined; resourceInputs["name"] = args ? args.name : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LoadbalancerFrontendTlsConfig.__pulumiType, name, resourceInputs, opts); } } exports.LoadbalancerFrontendTlsConfig = LoadbalancerFrontendTlsConfig; /** @internal */ LoadbalancerFrontendTlsConfig.__pulumiType = 'upcloud:index/loadbalancerFrontendTlsConfig:LoadbalancerFrontendTlsConfig'; //# sourceMappingURL=loadbalancerFrontendTlsConfig.js.map