// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; export class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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. */ public static get(name: string, id: pulumi.Input, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance { return new Instance(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'incus:index/instance:Instance'; /** * Returns true if the given object is an instance of Instance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is Instance { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Instance.__pulumiType; } /** * *Optional* - Map of key/value pairs of * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). */ public readonly config!: pulumi.Output<{[key: string]: string}>; /** * *Optional* - Description of the instance. */ public readonly description!: pulumi.Output; /** * *Optional* - Device definition. See reference below. */ public readonly devices!: pulumi.Output; /** * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. */ public readonly ephemeral!: pulumi.Output; /** * *Optional* - File to upload to the instance. See reference below. */ public readonly files!: pulumi.Output; /** * *Optional* - Base image from which the instance will be created. Must * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). */ public readonly image!: pulumi.Output; /** * The IPv4 Address of the instance. See Instance Network * Access for more details. */ public /*out*/ readonly ipv4Address!: pulumi.Output; /** * The IPv6 Address of the instance. See Instance Network * Access for more details. */ public /*out*/ readonly ipv6Address!: pulumi.Output; /** * The MAC address of the detected NIC. See Instance Network * Access for more details. */ public /*out*/ readonly macAddress!: pulumi.Output; /** * **Required** - Name of the instance. */ public readonly name!: pulumi.Output; /** * *Optional* - List of Incus config profiles to apply to the new * instance. Profile `default` will be applied if profiles are not set (are `null`). * However, if an empty array (`[]`) is set as a value, no profiles will be applied. */ public readonly profiles!: pulumi.Output; /** * *Optional* - Name of the project where the instance will be spawned. */ public readonly project!: pulumi.Output; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ public readonly remote!: pulumi.Output; /** * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. */ public readonly running!: pulumi.Output; /** * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. */ public readonly sourceFile!: pulumi.Output; /** * *Optional* - The source instance from which the instance will be created. See reference below. */ public readonly sourceInstance!: pulumi.Output; /** * The status of the instance. */ public /*out*/ readonly status!: pulumi.Output; /** * *Optional* - Specify a target node in a cluster. */ public readonly target!: pulumi.Output; /** * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. */ public readonly type!: pulumi.Output; /** * *Optional* - WaitFor definition. See reference below. * If `running` is set to false or instance is already running (on update), this value has no effect. */ public readonly waitFors!: pulumi.Output; /** * Create a Instance 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?: InstanceArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: InstanceArgs | InstanceState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as InstanceState | undefined; resourceInputs["config"] = state ? state.config : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["devices"] = state ? state.devices : undefined; resourceInputs["ephemeral"] = state ? state.ephemeral : undefined; resourceInputs["files"] = state ? state.files : undefined; resourceInputs["image"] = state ? state.image : undefined; resourceInputs["ipv4Address"] = state ? state.ipv4Address : undefined; resourceInputs["ipv6Address"] = state ? state.ipv6Address : undefined; resourceInputs["macAddress"] = state ? state.macAddress : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["profiles"] = state ? state.profiles : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["remote"] = state ? state.remote : undefined; resourceInputs["running"] = state ? state.running : undefined; resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; resourceInputs["sourceInstance"] = state ? state.sourceInstance : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["target"] = state ? state.target : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["waitFors"] = state ? state.waitFors : undefined; } else { const args = argsOrState as InstanceArgs | undefined; resourceInputs["config"] = args ? args.config : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["devices"] = args ? args.devices : undefined; resourceInputs["ephemeral"] = args ? args.ephemeral : undefined; resourceInputs["files"] = args ? args.files : undefined; resourceInputs["image"] = args ? args.image : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["profiles"] = args ? args.profiles : undefined; resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; resourceInputs["remote"] = args ? args.remote : undefined; resourceInputs["running"] = args ? args.running : undefined; resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; resourceInputs["sourceInstance"] = args ? args.sourceInstance : undefined; resourceInputs["target"] = args ? args.target : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["waitFors"] = args ? args.waitFors : undefined; resourceInputs["ipv4Address"] = undefined /*out*/; resourceInputs["ipv6Address"] = undefined /*out*/; resourceInputs["macAddress"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Instance.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * *Optional* - Map of key/value pairs of * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * *Optional* - Description of the instance. */ description?: pulumi.Input; /** * *Optional* - Device definition. See reference below. */ devices?: pulumi.Input[]>; /** * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. */ ephemeral?: pulumi.Input; /** * *Optional* - File to upload to the instance. See reference below. */ files?: pulumi.Input[]>; /** * *Optional* - Base image from which the instance will be created. Must * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). */ image?: pulumi.Input; /** * The IPv4 Address of the instance. See Instance Network * Access for more details. */ ipv4Address?: pulumi.Input; /** * The IPv6 Address of the instance. See Instance Network * Access for more details. */ ipv6Address?: pulumi.Input; /** * The MAC address of the detected NIC. See Instance Network * Access for more details. */ macAddress?: pulumi.Input; /** * **Required** - Name of the instance. */ name?: pulumi.Input; /** * *Optional* - List of Incus config profiles to apply to the new * instance. Profile `default` will be applied if profiles are not set (are `null`). * However, if an empty array (`[]`) is set as a value, no profiles will be applied. */ profiles?: pulumi.Input[]>; /** * *Optional* - Name of the project where the instance will be spawned. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; /** * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. */ running?: pulumi.Input; /** * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. */ sourceFile?: pulumi.Input; /** * *Optional* - The source instance from which the instance will be created. See reference below. */ sourceInstance?: pulumi.Input; /** * The status of the instance. */ status?: pulumi.Input; /** * *Optional* - Specify a target node in a cluster. */ target?: pulumi.Input; /** * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. */ type?: pulumi.Input; /** * *Optional* - WaitFor definition. See reference below. * If `running` is set to false or instance is already running (on update), this value has no effect. */ waitFors?: pulumi.Input[]>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * *Optional* - Map of key/value pairs of * [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/). */ config?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * *Optional* - Description of the instance. */ description?: pulumi.Input; /** * *Optional* - Device definition. See reference below. */ devices?: pulumi.Input[]>; /** * *Optional* - Boolean indicating if this instance is ephemeral. Defaults to `false`. */ ephemeral?: pulumi.Input; /** * *Optional* - File to upload to the instance. See reference below. */ files?: pulumi.Input[]>; /** * *Optional* - Base image from which the instance will be created. Must * specify [an image accessible from the provider remote](https://linuxcontainers.org/incus/docs/main/reference/image_servers/). */ image?: pulumi.Input; /** * **Required** - Name of the instance. */ name?: pulumi.Input; /** * *Optional* - List of Incus config profiles to apply to the new * instance. Profile `default` will be applied if profiles are not set (are `null`). * However, if an empty array (`[]`) is set as a value, no profiles will be applied. */ profiles?: pulumi.Input[]>; /** * *Optional* - Name of the project where the instance will be spawned. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; /** * *Optional* - Boolean indicating whether the instance should be started (running). Defaults to `true`. */ running?: pulumi.Input; /** * *Optional* - The souce backup file from which the instance should be restored. For handling of storage pool, see examples. */ sourceFile?: pulumi.Input; /** * *Optional* - The source instance from which the instance will be created. See reference below. */ sourceInstance?: pulumi.Input; /** * *Optional* - Specify a target node in a cluster. */ target?: pulumi.Input; /** * *Optional* - Instance type. Can be `container`, or `virtual-machine`. Defaults to `container`. */ type?: pulumi.Input; /** * *Optional* - WaitFor definition. See reference below. * If `running` is set to false or instance is already running (on update), this value has no effect. */ waitFors?: pulumi.Input[]>; }