UNPKG

@muhlba91/pulumi-proxmoxve

Version:

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

87 lines 3.85 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.FirewallAlias = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Aliases are used to see what devices or group of devices are affected by a rule. * We can create aliases to identify an IP address or a network. 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 localNetwork = new proxmoxve.network.FirewallAlias("localNetwork", { * nodeName: proxmox_virtual_environment_vm.example.node_name, * vmId: proxmox_virtual_environment_vm.example.vm_id, * cidr: "192.168.0.0/23", * comment: "Managed by Pulumi", * }, { * dependsOn: [proxmox_virtual_environment_vm.example], * }); * const ubuntuVm = new proxmoxve.network.FirewallAlias("ubuntuVm", { * cidr: "192.168.0.1", * comment: "Managed by Pulumi", * }); * ``` */ class FirewallAlias extends pulumi.CustomResource { /** * Get an existing FirewallAlias 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 FirewallAlias(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FirewallAlias. 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'] === FirewallAlias.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cidr"] = state ? state.cidr : 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; if ((!args || args.cidr === undefined) && !opts.urn) { throw new Error("Missing required property 'cidr'"); } resourceInputs["cidr"] = args ? args.cidr : 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(FirewallAlias.__pulumiType, name, resourceInputs, opts); } } exports.FirewallAlias = FirewallAlias; /** @internal */ FirewallAlias.__pulumiType = 'proxmoxve:Network/firewallAlias:FirewallAlias'; //# sourceMappingURL=firewallAlias.js.map