UNPKG

@muhlba91/pulumi-proxmoxve

Version:

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

93 lines 3.81 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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.FirewallIPSet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An IPSet allows us to group multiple IP addresses, IP subnets and aliases. Aliases can be * created on the cluster level, on VM / Container level. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * const ipset = new proxmoxve.network.FirewallIPSet("ipset", { * nodeName: proxmox_virtual_environment_vm.example.node_name, * vmId: proxmox_virtual_environment_vm.example.vm_id, * comment: "Managed by Pulumi", * cidrs: [ * { * name: "192.168.0.0/23", * comment: "Local network 1", * }, * { * name: "192.168.0.1", * comment: "Server 1", * nomatch: true, * }, * { * name: "192.168.2.1", * comment: "Server 1", * }, * ], * }, { * dependsOn: [proxmox_virtual_environment_vm.example], * }); * ``` */ class FirewallIPSet extends pulumi.CustomResource { /** * Get an existing FirewallIPSet 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 FirewallIPSet(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FirewallIPSet. 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'] === FirewallIPSet.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cidrs"] = state ? state.cidrs : undefined; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["containerId"] = state ? state.containerId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nodeName"] = state ? state.nodeName : undefined; resourceInputs["vmId"] = state ? state.vmId : undefined; } else { const args = argsOrState; resourceInputs["cidrs"] = args ? args.cidrs : undefined; resourceInputs["comment"] = args ? args.comment : undefined; resourceInputs["containerId"] = args ? args.containerId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["nodeName"] = args ? args.nodeName : undefined; resourceInputs["vmId"] = args ? args.vmId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FirewallIPSet.__pulumiType, name, resourceInputs, opts); } } exports.FirewallIPSet = FirewallIPSet; /** @internal */ FirewallIPSet.__pulumiType = 'proxmoxve:Network/firewallIPSet:FirewallIPSet'; //# sourceMappingURL=firewallIPSet.js.map