import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * The UpCloud server resource allows the creation, update and deletion of [cloud servers](https://upcloud.com/products/cloud-servers). * * > To deploy a GPU server, select a plan with `GPU-` prefix, e.g., `GPU-8xCPU-64GB-1xL40S`. Use `upctl zone devices` command to list per zone GPU availability. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * const example = new upcloud.Server("example", { * hostname: "terraform.example.tld", * zone: "de-fra1", * plan: "1xCPU-1GB", * metadata: true, * template: { * storage: "Ubuntu Server 24.04 LTS (Noble Numbat)", * size: 25, * backupRules: [{ * interval: "daily", * time: "0100", * retention: 8, * }], * }, * networkInterfaces: [{ * type: "public", * }], * labels: { * env: "dev", * production: "false", * }, * login: { * user: "myusername", * keys: [""], * }, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import upcloud:index/server:Server example_server ead4544f-10bf-42a3-b98a-a0fea2e2ad14 * ``` */ export declare class Server extends pulumi.CustomResource { /** * Get an existing Server 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?: ServerState, opts?: pulumi.CustomResourceOptions): Server; /** * Returns true if the given object is an instance of Server. 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 Server; /** * The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` */ readonly bootOrder: pulumi.Output; /** * The number of CPU cores for the server */ readonly cpu: pulumi.Output; /** * Are firewall rules active for the server */ readonly firewall: pulumi.Output; /** * Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts */ readonly host: pulumi.Output; /** * The hostname of the server. */ readonly hostname: pulumi.Output; /** * If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. */ readonly hotResize: pulumi.Output; /** * User defined key-value pairs to classify the server. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * Configure access credentials to the server */ readonly login: pulumi.Output; /** * The amount of memory for the server (in megabytes) */ readonly mem: pulumi.Output; /** * Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. */ readonly metadata: pulumi.Output; /** * One or more blocks describing the network interfaces of the server. * * In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. * * We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. */ readonly networkInterfaces: pulumi.Output; /** * The model of the server's network interfaces */ readonly nicModel: pulumi.Output; /** * The pricing plan used for the server. You can list available server plans with `upctl server plans` */ readonly plan: pulumi.Output; /** * The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. */ readonly serverGroup: pulumi.Output; readonly simpleBackup: pulumi.Output; /** * A set of storage devices associated with the server */ readonly storageDevices: pulumi.Output; /** * Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. */ readonly tags: pulumi.Output; /** * Block describing the preconfigured operating system */ readonly template: pulumi.Output; /** * The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. */ readonly timezone: pulumi.Output; /** * A short, informational description of the server. */ readonly title: pulumi.Output; /** * Defines URL for a server setup script, or the script body itself */ readonly userData: pulumi.Output; /** * The model of the server's video interface */ readonly videoModel: pulumi.Output; /** * The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ readonly zone: pulumi.Output; /** * Create a Server 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: ServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Server resources. */ export interface ServerState { /** * The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` */ bootOrder?: pulumi.Input; /** * The number of CPU cores for the server */ cpu?: pulumi.Input; /** * Are firewall rules active for the server */ firewall?: pulumi.Input; /** * Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts */ host?: pulumi.Input; /** * The hostname of the server. */ hostname?: pulumi.Input; /** * If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. */ hotResize?: pulumi.Input; /** * User defined key-value pairs to classify the server. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Configure access credentials to the server */ login?: pulumi.Input; /** * The amount of memory for the server (in megabytes) */ mem?: pulumi.Input; /** * Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. */ metadata?: pulumi.Input; /** * One or more blocks describing the network interfaces of the server. * * In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. * * We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. */ networkInterfaces?: pulumi.Input[]>; /** * The model of the server's network interfaces */ nicModel?: pulumi.Input; /** * The pricing plan used for the server. You can list available server plans with `upctl server plans` */ plan?: pulumi.Input; /** * The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. */ serverGroup?: pulumi.Input; simpleBackup?: pulumi.Input; /** * A set of storage devices associated with the server */ storageDevices?: pulumi.Input[]>; /** * Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. */ tags?: pulumi.Input[]>; /** * Block describing the preconfigured operating system */ template?: pulumi.Input; /** * The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. */ timezone?: pulumi.Input; /** * A short, informational description of the server. */ title?: pulumi.Input; /** * Defines URL for a server setup script, or the script body itself */ userData?: pulumi.Input; /** * The model of the server's video interface */ videoModel?: pulumi.Input; /** * The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a Server resource. */ export interface ServerArgs { /** * The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk` */ bootOrder?: pulumi.Input; /** * The number of CPU cores for the server */ cpu?: pulumi.Input; /** * Are firewall rules active for the server */ firewall?: pulumi.Input; /** * Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts */ host?: pulumi.Input; /** * The hostname of the server. */ hostname: pulumi.Input; /** * If set to true, allows changing the server plan without requiring a reboot. This enables hot resizing of the server. If hot resizing fails, the apply operation will fail. */ hotResize?: pulumi.Input; /** * User defined key-value pairs to classify the server. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Configure access credentials to the server */ login?: pulumi.Input; /** * The amount of memory for the server (in megabytes) */ mem?: pulumi.Input; /** * Is metadata service active for the server. The metadata service must be enabled when using recent cloud-init based templates. */ metadata?: pulumi.Input; /** * One or more blocks describing the network interfaces of the server. * * In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. * * We recommend explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from middle of the list. */ networkInterfaces?: pulumi.Input[]>; /** * The model of the server's network interfaces */ nicModel?: pulumi.Input; /** * The pricing plan used for the server. You can list available server plans with `upctl server plans` */ plan?: pulumi.Input; /** * The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only updated if it has been set to non-zero value. */ serverGroup?: pulumi.Input; simpleBackup?: pulumi.Input; /** * A set of storage devices associated with the server */ storageDevices?: pulumi.Input[]>; /** * Tags to attach to the server. Note that tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. */ tags?: pulumi.Input[]>; /** * Block describing the preconfigured operating system */ template?: pulumi.Input; /** * The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`. */ timezone?: pulumi.Input; /** * A short, informational description of the server. */ title?: pulumi.Input; /** * Defines URL for a server setup script, or the script body itself */ userData?: pulumi.Input; /** * The model of the server's video interface */ videoModel?: pulumi.Input; /** * The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`. */ zone: pulumi.Input; }