import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * A VM instance resource. For more information, see * [the official documentation](https://cloud.yandex.com/docs/compute/concepts/vm). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fs from "fs"; * import * as yandex from "@pulumi/yandex"; * * const fooVpcNetwork = new yandex.VpcNetwork("foo", {}); * const fooVpcSubnet = new yandex.VpcSubnet("foo", { * networkId: fooVpcNetwork.id, * zone: "ru-central1-a", * }); * const defaultComputeInstance = new yandex.ComputeInstance("default", { * bootDisk: { * initializeParams: { * imageId: "image_id", * }, * }, * metadata: { * foo: "bar", * "ssh-keys": `ubuntu:${fs.readFileSync("~/.ssh/id_rsa.pub", "utf-8")}`, * }, * networkInterfaces: [{ * subnetId: fooVpcSubnet.id, * }], * platformId: "standard-v1", * resources: { * cores: 2, * memory: 4, * }, * zone: "ru-central1-a", * }); * ``` * * ## Import * * Instances can be imported using the `ID` of an instance, e.g. * * ```sh * $ pulumi import yandex:index/computeInstance:ComputeInstance default instance_id * ``` */ export declare class ComputeInstance extends pulumi.CustomResource { /** * Get an existing ComputeInstance 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?: ComputeInstanceState, opts?: pulumi.CustomResourceOptions): ComputeInstance; /** * Returns true if the given object is an instance of ComputeInstance. 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 ComputeInstance; readonly allowStoppingForUpdate: pulumi.Output; /** * The boot disk for the instance. The structure is documented below. */ readonly bootDisk: pulumi.Output; /** * Creation timestamp of the instance. */ readonly createdAt: pulumi.Output; /** * Description of the boot disk. */ readonly description: pulumi.Output; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ readonly folderId: pulumi.Output; /** * DNS record FQDN (must have a dot at the end). */ readonly fqdn: pulumi.Output; /** * Host name for the instance. This field is used to generate the instance `fqdn` value. * The host name must be unique within the network and region. If not specified, the host name will be equal * to `id` of the instance and `fqdn` will be `.auto.internal`. * Otherwise FQDN will be `..internal`. */ readonly hostname: pulumi.Output; /** * A set of key/value label pairs to assign to the instance. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Metadata key/value pairs to make available from * within the instance. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Name of the boot disk. */ readonly name: pulumi.Output; /** * Type of network acceleration. The default is `standard`. Values: `standard`, `softwareAccelerated` */ readonly networkAccelerationType: pulumi.Output; /** * Networks to attach to the instance. This can * be specified multiple times. The structure is documented below. */ readonly networkInterfaces: pulumi.Output; /** * The placement policy configuration. The structure is documented below. */ readonly placementPolicy: pulumi.Output; /** * The type of virtual machine to create. The default is 'standard-v1'. */ readonly platformId: pulumi.Output; /** * Compute resources that are allocated for the instance. The structure is documented below. */ readonly resources: pulumi.Output; /** * Scheduling policy configuration. The structure is documented below. */ readonly schedulingPolicy: pulumi.Output; /** * A list of disks to attach to the instance. The structure is documented below. * **Note**: The `allowStoppingForUpdate` property must be set to true in order to update this structure. */ readonly secondaryDisks: pulumi.Output; /** * ID of the service account authorized for this instance. */ readonly serviceAccountId: pulumi.Output; /** * The status of this instance. */ readonly status: pulumi.Output; /** * The availability zone where the virtual machine will be created. If it is not provided, * the default provider folder is used. */ readonly zone: pulumi.Output; /** * Create a ComputeInstance 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: ComputeInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ComputeInstance resources. */ export interface ComputeInstanceState { allowStoppingForUpdate?: pulumi.Input; /** * The boot disk for the instance. The structure is documented below. */ bootDisk?: pulumi.Input; /** * Creation timestamp of the instance. */ createdAt?: pulumi.Input; /** * Description of the boot disk. */ description?: pulumi.Input; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * DNS record FQDN (must have a dot at the end). */ fqdn?: pulumi.Input; /** * Host name for the instance. This field is used to generate the instance `fqdn` value. * The host name must be unique within the network and region. If not specified, the host name will be equal * to `id` of the instance and `fqdn` will be `.auto.internal`. * Otherwise FQDN will be `..internal`. */ hostname?: pulumi.Input; /** * A set of key/value label pairs to assign to the instance. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Metadata key/value pairs to make available from * within the instance. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the boot disk. */ name?: pulumi.Input; /** * Type of network acceleration. The default is `standard`. Values: `standard`, `softwareAccelerated` */ networkAccelerationType?: pulumi.Input; /** * Networks to attach to the instance. This can * be specified multiple times. The structure is documented below. */ networkInterfaces?: pulumi.Input[]>; /** * The placement policy configuration. The structure is documented below. */ placementPolicy?: pulumi.Input; /** * The type of virtual machine to create. The default is 'standard-v1'. */ platformId?: pulumi.Input; /** * Compute resources that are allocated for the instance. The structure is documented below. */ resources?: pulumi.Input; /** * Scheduling policy configuration. The structure is documented below. */ schedulingPolicy?: pulumi.Input; /** * A list of disks to attach to the instance. The structure is documented below. * **Note**: The `allowStoppingForUpdate` property must be set to true in order to update this structure. */ secondaryDisks?: pulumi.Input[]>; /** * ID of the service account authorized for this instance. */ serviceAccountId?: pulumi.Input; /** * The status of this instance. */ status?: pulumi.Input; /** * The availability zone where the virtual machine will be created. If it is not provided, * the default provider folder is used. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a ComputeInstance resource. */ export interface ComputeInstanceArgs { allowStoppingForUpdate?: pulumi.Input; /** * The boot disk for the instance. The structure is documented below. */ bootDisk: pulumi.Input; /** * Description of the boot disk. */ description?: pulumi.Input; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * Host name for the instance. This field is used to generate the instance `fqdn` value. * The host name must be unique within the network and region. If not specified, the host name will be equal * to `id` of the instance and `fqdn` will be `.auto.internal`. * Otherwise FQDN will be `..internal`. */ hostname?: pulumi.Input; /** * A set of key/value label pairs to assign to the instance. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Metadata key/value pairs to make available from * within the instance. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Name of the boot disk. */ name?: pulumi.Input; /** * Type of network acceleration. The default is `standard`. Values: `standard`, `softwareAccelerated` */ networkAccelerationType?: pulumi.Input; /** * Networks to attach to the instance. This can * be specified multiple times. The structure is documented below. */ networkInterfaces: pulumi.Input[]>; /** * The placement policy configuration. The structure is documented below. */ placementPolicy?: pulumi.Input; /** * The type of virtual machine to create. The default is 'standard-v1'. */ platformId?: pulumi.Input; /** * Compute resources that are allocated for the instance. The structure is documented below. */ resources: pulumi.Input; /** * Scheduling policy configuration. The structure is documented below. */ schedulingPolicy?: pulumi.Input; /** * A list of disks to attach to the instance. The structure is documented below. * **Note**: The `allowStoppingForUpdate` property must be set to true in order to update this structure. */ secondaryDisks?: pulumi.Input[]>; /** * ID of the service account authorized for this instance. */ serviceAccountId?: pulumi.Input; /** * The availability zone where the virtual machine will be created. If it is not provided, * the default provider folder is used. */ zone?: pulumi.Input; }