import * as pulumi from "@pulumi/pulumi"; /** * Adds a target to a Hetzner Cloud Load Balancer. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const myServer = new hcloud.Server("my_server", { * name: "my-server", * serverType: "cx23", * image: "ubuntu-24.04", * }); * const loadBalancer = new hcloud.LoadBalancer("load_balancer", { * name: "my-load-balancer", * loadBalancerType: "lb11", * location: "nbg1", * }); * const loadBalancerTarget = new hcloud.LoadBalancerTarget("load_balancer_target", { * type: "server", * loadBalancerId: loadBalancer.id, * serverId: myServer.id, * }); * ``` * * ## Import * * Load Balancer Target entries can be imported using a compound ID with the following format: * `____` * * Where _identifier_ depends on the _type_: * * - `server`: server id, for example: `123` * - `labelSelector`: label selector, for example: `foo=bar` * - `ip`: ip address, for example: `203.0.113.123` * * ```sh * $ pulumi import hcloud:index/loadBalancerTarget:LoadBalancerTarget server "${LOAD_BALANCER_ID}__server__${SERVER_ID}" * $ pulumi import hcloud:index/loadBalancerTarget:LoadBalancerTarget label "${LOAD_BALANCER_ID}__label_selector__${LABEL_SELECTOR}" * $ pulumi import hcloud:index/loadBalancerTarget:LoadBalancerTarget ip "${LOAD_BALANCER_ID}__ip__${IP}" * ``` */ export declare class LoadBalancerTarget extends pulumi.CustomResource { /** * Get an existing LoadBalancerTarget 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: string, id: pulumi.Input, state?: LoadBalancerTargetState, opts?: pulumi.CustomResourceOptions): LoadBalancerTarget; /** * Returns true if the given object is an instance of LoadBalancerTarget. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LoadBalancerTarget; /** * IP address for an IP Target. Required if * `type` is `ip`. */ readonly ip: pulumi.Output; /** * Label Selector selecting targets * for this Load Balancer. Required if `type` is `labelSelector`. */ readonly labelSelector: pulumi.Output; /** * ID of the Load Balancer to which * the target gets attached. */ readonly loadBalancerId: pulumi.Output; /** * ID of the server which should be a * target for this Load Balancer. Required if `type` is `server` */ readonly serverId: pulumi.Output; /** * Type of the target. Possible values * `server`, `labelSelector`, `ip`. */ readonly type: pulumi.Output; /** * use the private IP to connect to * Load Balancer targets. Only allowed if type is `server` or * `labelSelector`. */ readonly usePrivateIp: pulumi.Output; /** * Create a LoadBalancerTarget resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LoadBalancerTargetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LoadBalancerTarget resources. */ export interface LoadBalancerTargetState { /** * IP address for an IP Target. Required if * `type` is `ip`. */ ip?: pulumi.Input; /** * Label Selector selecting targets * for this Load Balancer. Required if `type` is `labelSelector`. */ labelSelector?: pulumi.Input; /** * ID of the Load Balancer to which * the target gets attached. */ loadBalancerId?: pulumi.Input; /** * ID of the server which should be a * target for this Load Balancer. Required if `type` is `server` */ serverId?: pulumi.Input; /** * Type of the target. Possible values * `server`, `labelSelector`, `ip`. */ type?: pulumi.Input; /** * use the private IP to connect to * Load Balancer targets. Only allowed if type is `server` or * `labelSelector`. */ usePrivateIp?: pulumi.Input; } /** * The set of arguments for constructing a LoadBalancerTarget resource. */ export interface LoadBalancerTargetArgs { /** * IP address for an IP Target. Required if * `type` is `ip`. */ ip?: pulumi.Input; /** * Label Selector selecting targets * for this Load Balancer. Required if `type` is `labelSelector`. */ labelSelector?: pulumi.Input; /** * ID of the Load Balancer to which * the target gets attached. */ loadBalancerId: pulumi.Input; /** * ID of the server which should be a * target for this Load Balancer. Required if `type` is `server` */ serverId?: pulumi.Input; /** * Type of the target. Possible values * `server`, `labelSelector`, `ip`. */ type: pulumi.Input; /** * use the private IP to connect to * Load Balancer targets. Only allowed if type is `server` or * `labelSelector`. */ usePrivateIp?: pulumi.Input; }