@pulumiverse/fortios
Version:
A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0
159 lines • 6.99 kB
JavaScript
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.InterfacePort = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to configure interface settings of FortiOS.
*
* !> **Warning:** The resource will be deprecated and replaced by new resource `fortios.system.Interface`, we recommend that you use the new resource.
*
* ## Example Usage
*
* ### Loopback Interface
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const loopback1 = new fortios.networking.InterfacePort("loopback1", {
* alias: "cc1",
* allowaccess: "ping http",
* description: "description",
* ip: "23.123.33.10 255.255.255.0",
* mode: "static",
* role: "lan",
* status: "up",
* type: "loopback",
* vdom: "root",
* });
* ```
*
* ### VLAN Interface
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const vlan1 = new fortios.networking.InterfacePort("vlan1", {
* allowaccess: "ping",
* defaultgw: "enable",
* distance: "33",
* "interface": "port2",
* ip: "3.123.33.10 255.255.255.0",
* mode: "static",
* role: "lan",
* type: "vlan",
* vdom: "root",
* vlanid: "3",
* });
* ```
*
* ### Physical Interface
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const test1 = new fortios.networking.InterfacePort("test1", {
* alias: "dkeeew",
* allowaccess: "ping https",
* defaultgw: "enable",
* description: "description",
* deviceIdentification: "enable",
* distance: "33",
* dnsServerOverride: "enable",
* ip: "93.133.133.110 255.255.255.0",
* mode: "static",
* mtu: "2933",
* mtuOverride: "enable",
* role: "lan",
* speed: "auto",
* status: "up",
* tcpMss: "3232",
* type: "physical",
* });
* ```
*/
class InterfacePort extends pulumi.CustomResource {
/**
* Get an existing InterfacePort 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 InterfacePort(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of InterfacePort. 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'] === InterfacePort.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["alias"] = state ? state.alias : undefined;
resourceInputs["allowaccess"] = state ? state.allowaccess : undefined;
resourceInputs["defaultgw"] = state ? state.defaultgw : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["deviceIdentification"] = state ? state.deviceIdentification : undefined;
resourceInputs["distance"] = state ? state.distance : undefined;
resourceInputs["dnsServerOverride"] = state ? state.dnsServerOverride : undefined;
resourceInputs["interface"] = state ? state.interface : undefined;
resourceInputs["ip"] = state ? state.ip : undefined;
resourceInputs["mode"] = state ? state.mode : undefined;
resourceInputs["mtu"] = state ? state.mtu : undefined;
resourceInputs["mtuOverride"] = state ? state.mtuOverride : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["role"] = state ? state.role : undefined;
resourceInputs["speed"] = state ? state.speed : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tcpMss"] = state ? state.tcpMss : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["vdom"] = state ? state.vdom : undefined;
resourceInputs["vlanid"] = state ? state.vlanid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["alias"] = args ? args.alias : undefined;
resourceInputs["allowaccess"] = args ? args.allowaccess : undefined;
resourceInputs["defaultgw"] = args ? args.defaultgw : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["deviceIdentification"] = args ? args.deviceIdentification : undefined;
resourceInputs["distance"] = args ? args.distance : undefined;
resourceInputs["dnsServerOverride"] = args ? args.dnsServerOverride : undefined;
resourceInputs["interface"] = args ? args.interface : undefined;
resourceInputs["ip"] = args ? args.ip : undefined;
resourceInputs["mode"] = args ? args.mode : undefined;
resourceInputs["mtu"] = args ? args.mtu : undefined;
resourceInputs["mtuOverride"] = args ? args.mtuOverride : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["role"] = args ? args.role : undefined;
resourceInputs["speed"] = args ? args.speed : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["tcpMss"] = args ? args.tcpMss : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["vdom"] = args ? args.vdom : undefined;
resourceInputs["vlanid"] = args ? args.vlanid : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(InterfacePort.__pulumiType, name, resourceInputs, opts);
}
}
exports.InterfacePort = InterfacePort;
/** @internal */
InterfacePort.__pulumiType = 'fortios:networking/interfacePort:InterfacePort';
//# sourceMappingURL=interfacePort.js.map
;