UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

95 lines 3.77 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.LoadbalancerBackend = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource represents load balancer backend service. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * 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 = 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 LoadbalancerBackend extends pulumi.CustomResource { /** * Get an existing LoadbalancerBackend 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 LoadbalancerBackend(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of LoadbalancerBackend. 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'] === LoadbalancerBackend.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["loadbalancer"] = state?.loadbalancer; resourceInputs["members"] = state?.members; resourceInputs["name"] = state?.name; resourceInputs["properties"] = state?.properties; resourceInputs["resolverName"] = state?.resolverName; resourceInputs["tlsConfigs"] = state?.tlsConfigs; } else { const args = argsOrState; if (args?.loadbalancer === undefined && !opts.urn) { throw new Error("Missing required property 'loadbalancer'"); } resourceInputs["loadbalancer"] = args?.loadbalancer; resourceInputs["name"] = args?.name; resourceInputs["properties"] = args?.properties; resourceInputs["resolverName"] = args?.resolverName; resourceInputs["members"] = undefined /*out*/; resourceInputs["tlsConfigs"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LoadbalancerBackend.__pulumiType, name, resourceInputs, opts); } } exports.LoadbalancerBackend = LoadbalancerBackend; /** @internal */ LoadbalancerBackend.__pulumiType = 'upcloud:index/loadbalancerBackend:LoadbalancerBackend'; //# sourceMappingURL=loadbalancerBackend.js.map