@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
85 lines • 4.75 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualMachine2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* !> **DO NOT USE**
* This is an experimental implementation of a Proxmox VM resource using Plugin Framework.<br><br>It is a Proof of Concept, highly experimental and **will** change in future. It does not support all features of the Proxmox API for VMs and **MUST NOT** be used in production.
*
* > Many attributes are marked as **optional** _and_ **computed** in the schema,
* hence you may seem added to the plan with "(known after apply)" status, even if they are not set in the configuration.
* This is done to support the `clone` operation, when a VM is created from an existing VM or template,
* and the source attributes are copied to the clone.<br><br>
* Computed attributes allow the provider to set those attributes without user input.
* The attributes are also marked as optional to allow the practitioner to set (or overwrite) them if needed.
*/
class VirtualMachine2 extends pulumi.CustomResource {
/**
* Get an existing VirtualMachine2 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, id, state, opts) {
return new VirtualMachine2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VirtualMachine2. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === VirtualMachine2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cdrom"] = state ? state.cdrom : undefined;
resourceInputs["clone"] = state ? state.clone : undefined;
resourceInputs["cpu"] = state ? state.cpu : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nodeName"] = state ? state.nodeName : undefined;
resourceInputs["rng"] = state ? state.rng : undefined;
resourceInputs["stopOnDestroy"] = state ? state.stopOnDestroy : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["template"] = state ? state.template : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
resourceInputs["vga"] = state ? state.vga : undefined;
}
else {
const args = argsOrState;
if ((!args || args.nodeName === undefined) && !opts.urn) {
throw new Error("Missing required property 'nodeName'");
}
resourceInputs["cdrom"] = args ? args.cdrom : undefined;
resourceInputs["clone"] = args ? args.clone : undefined;
resourceInputs["cpu"] = args ? args.cpu : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["nodeName"] = args ? args.nodeName : undefined;
resourceInputs["rng"] = args ? args.rng : undefined;
resourceInputs["stopOnDestroy"] = args ? args.stopOnDestroy : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["template"] = args ? args.template : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["vga"] = args ? args.vga : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VirtualMachine2.__pulumiType, name, resourceInputs, opts);
}
}
exports.VirtualMachine2 = VirtualMachine2;
/** @internal */
VirtualMachine2.__pulumiType = 'proxmoxve:VM/virtualMachine2:VirtualMachine2';
//# sourceMappingURL=virtualMachine2.js.map