import * as pulumi from "@pulumi/pulumi"; /** * Manage the attachment of a Server in a Network in the Hetzner Cloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const node1 = new hcloud.Server("node1", { * name: "node1", * image: "debian-12", * serverType: "cx23", * }); * const network = new hcloud.Network("network", { * name: "network", * ipRange: "10.0.0.0/16", * }); * const subnet1 = new hcloud.NetworkSubnet("subnet1", { * networkId: network.id, * type: "cloud", * networkZone: "eu-central", * ipRange: "10.0.1.0/24", * }); * const node1Subnet1 = new hcloud.ServerNetwork("node1_subnet1", { * serverId: node1.id, * subnetId: subnet1.id, * ip: "10.0.1.5", * aliasIps: ["10.0.1.10"], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import hcloud:index/serverNetwork:ServerNetwork example "$SERVER_ID-$NETWORK_ID" * ``` */ export declare class ServerNetwork extends pulumi.CustomResource { /** * Get an existing ServerNetwork 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?: ServerNetworkState, opts?: pulumi.CustomResourceOptions): ServerNetwork; /** * Returns true if the given object is an instance of ServerNetwork. 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 ServerNetwork; /** * Additional IPs to assign to the Server. */ readonly aliasIps: pulumi.Output; /** * IP to assign to the Server. */ readonly ip: pulumi.Output; /** * MAC address of the Server on the Network. */ readonly macAddress: pulumi.Output; /** * ID of the Network to attach the Server to. Using `subnetId` is preferred. Required if `subnetId` is not set. If `subnetId` or `ip` are not set, the Server will be attached to the last subnet (ordered by `ipRange`). */ readonly networkId: pulumi.Output; /** * ID of the Server. */ readonly serverId: pulumi.Output; /** * ID of the Subnet to attach the Server to. Required if `networkId` is not set. */ readonly subnetId: pulumi.Output; /** * Create a ServerNetwork 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: ServerNetworkArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServerNetwork resources. */ export interface ServerNetworkState { /** * Additional IPs to assign to the Server. */ aliasIps?: pulumi.Input[]>; /** * IP to assign to the Server. */ ip?: pulumi.Input; /** * MAC address of the Server on the Network. */ macAddress?: pulumi.Input; /** * ID of the Network to attach the Server to. Using `subnetId` is preferred. Required if `subnetId` is not set. If `subnetId` or `ip` are not set, the Server will be attached to the last subnet (ordered by `ipRange`). */ networkId?: pulumi.Input; /** * ID of the Server. */ serverId?: pulumi.Input; /** * ID of the Subnet to attach the Server to. Required if `networkId` is not set. */ subnetId?: pulumi.Input; } /** * The set of arguments for constructing a ServerNetwork resource. */ export interface ServerNetworkArgs { /** * Additional IPs to assign to the Server. */ aliasIps?: pulumi.Input[]>; /** * IP to assign to the Server. */ ip?: pulumi.Input; /** * ID of the Network to attach the Server to. Using `subnetId` is preferred. Required if `subnetId` is not set. If `subnetId` or `ip` are not set, the Server will be attached to the last subnet (ordered by `ipRange`). */ networkId?: pulumi.Input; /** * ID of the Server. */ serverId: pulumi.Input; /** * ID of the Subnet to attach the Server to. Required if `networkId` is not set. */ subnetId?: pulumi.Input; }