UNPKG

@muhlba91/pulumi-proxmoxve

Version:

A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.

146 lines 5.93 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.OptionsLegacy = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * Manages firewall options on VM / Container level. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * const example = new proxmoxve.firewall.OptionsLegacy("example", { * nodeName: exampleProxmoxVirtualEnvironmentVm.nodeName, * vmId: Number(exampleProxmoxVirtualEnvironmentVm.vmId), * dhcp: true, * enabled: false, * ipfilter: true, * logLevelIn: "info", * logLevelOut: "info", * macfilter: false, * ndp: true, * inputPolicy: "ACCEPT", * outputPolicy: "ACCEPT", * radv: true, * }, { * dependsOn: [exampleProxmoxVirtualEnvironmentVm], * }); * ``` * * ## Import * * ### VM Firewall Options * Use the import ID format: `vm/<node_name>/<vm_id>` * Example uses node name `pve` and VM ID `100`. * * **Example:** * ```sh * $ pulumi import proxmoxve:firewall/optionsLegacy:OptionsLegacy vm_firewall_options vm/pve/100 * ``` * * ### Container Firewall Options * Use the import ID format: `container/<node_name>/<container_id>` * Example uses node name `pve` and container ID `100`. * * **Example:** * ```sh * $ pulumi import proxmoxve:firewall/optionsLegacy:OptionsLegacy container_firewall_options container/pve/100 * ``` */ class OptionsLegacy extends pulumi.CustomResource { /** * Get an existing OptionsLegacy 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 OptionsLegacy(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'proxmoxve:firewall/optionsLegacy:OptionsLegacy'; /** * Returns true if the given object is an instance of OptionsLegacy. 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'] === OptionsLegacy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["containerId"] = state?.containerId; resourceInputs["dhcp"] = state?.dhcp; resourceInputs["enabled"] = state?.enabled; resourceInputs["inputPolicy"] = state?.inputPolicy; resourceInputs["ipfilter"] = state?.ipfilter; resourceInputs["logLevelIn"] = state?.logLevelIn; resourceInputs["logLevelOut"] = state?.logLevelOut; resourceInputs["macfilter"] = state?.macfilter; resourceInputs["ndp"] = state?.ndp; resourceInputs["nodeName"] = state?.nodeName; resourceInputs["outputPolicy"] = state?.outputPolicy; resourceInputs["radv"] = state?.radv; resourceInputs["vmId"] = state?.vmId; } else { const args = argsOrState; if (args?.nodeName === undefined && !opts.urn) { throw new Error("Missing required property 'nodeName'"); } resourceInputs["containerId"] = args?.containerId; resourceInputs["dhcp"] = args?.dhcp; resourceInputs["enabled"] = args?.enabled; resourceInputs["inputPolicy"] = args?.inputPolicy; resourceInputs["ipfilter"] = args?.ipfilter; resourceInputs["logLevelIn"] = args?.logLevelIn; resourceInputs["logLevelOut"] = args?.logLevelOut; resourceInputs["macfilter"] = args?.macfilter; resourceInputs["ndp"] = args?.ndp; resourceInputs["nodeName"] = args?.nodeName; resourceInputs["outputPolicy"] = args?.outputPolicy; resourceInputs["radv"] = args?.radv; resourceInputs["vmId"] = args?.vmId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OptionsLegacy.__pulumiType, name, resourceInputs, opts); } } exports.OptionsLegacy = OptionsLegacy; //# sourceMappingURL=optionsLegacy.js.map