@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
106 lines • 4.61 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.NetworkBridge = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a Linux Bridge network interface in a Proxmox VE node.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
*
* const vlan99 = new proxmoxve.network.NetworkVlan("vlan99", {nodeName: "pve"});
* //# or alternatively, use custom name:
* // name = "vlan_lab"
* // interface = "eno0"
* // vlan = 98
* const vmbr99 = new proxmoxve.network.NetworkBridge("vmbr99", {
* nodeName: "pve",
* address: "99.99.99.99/16",
* comment: "vmbr99 comment",
* ports: ["ens18.99"],
* }, {
* dependsOn: [vlan99],
* });
* ```
*
* ## Import
*
* #!/usr/bin/env sh
*
* #Interfaces can be imported using the `node_name:iface` format, e.g.
*
* ```sh
* $ pulumi import proxmoxve:Network/networkBridge:NetworkBridge vmbr99 pve:vmbr99
* ```
*/
class NetworkBridge extends pulumi.CustomResource {
/**
* Get an existing NetworkBridge 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 NetworkBridge(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of NetworkBridge. 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'] === NetworkBridge.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["address"] = state ? state.address : undefined;
resourceInputs["address6"] = state ? state.address6 : undefined;
resourceInputs["autostart"] = state ? state.autostart : undefined;
resourceInputs["comment"] = state ? state.comment : undefined;
resourceInputs["gateway"] = state ? state.gateway : undefined;
resourceInputs["gateway6"] = state ? state.gateway6 : undefined;
resourceInputs["mtu"] = state ? state.mtu : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nodeName"] = state ? state.nodeName : undefined;
resourceInputs["ports"] = state ? state.ports : undefined;
resourceInputs["vlanAware"] = state ? state.vlanAware : undefined;
}
else {
const args = argsOrState;
if ((!args || args.nodeName === undefined) && !opts.urn) {
throw new Error("Missing required property 'nodeName'");
}
resourceInputs["address"] = args ? args.address : undefined;
resourceInputs["address6"] = args ? args.address6 : undefined;
resourceInputs["autostart"] = args ? args.autostart : undefined;
resourceInputs["comment"] = args ? args.comment : undefined;
resourceInputs["gateway"] = args ? args.gateway : undefined;
resourceInputs["gateway6"] = args ? args.gateway6 : undefined;
resourceInputs["mtu"] = args ? args.mtu : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["nodeName"] = args ? args.nodeName : undefined;
resourceInputs["ports"] = args ? args.ports : undefined;
resourceInputs["vlanAware"] = args ? args.vlanAware : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NetworkBridge.__pulumiType, name, resourceInputs, opts);
}
}
exports.NetworkBridge = NetworkBridge;
/** @internal */
NetworkBridge.__pulumiType = 'proxmoxve:Network/networkBridge:NetworkBridge';
//# sourceMappingURL=networkBridge.js.map