UNPKG

@pulumiverse/fortios

Version:

A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0

114 lines 4.67 kB
"use strict"; // *** 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.Geneve = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Configure GENEVE devices. Applies to FortiOS Version `>= 6.2.4`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const trname = new fortios.system.Geneve("trname", { * dstport: 22, * "interface": "port2", * ipVersion: "ipv4-unicast", * remoteIp: "1.1.1.1", * remoteIp6: "::", * vni: 0, * }); * ``` * * ## Import * * System Geneve can be imported using any of these accepted formats: * * ```sh * $ pulumi import fortios:system/geneve:Geneve labelname {{name}} * ``` * * If you do not want to import arguments of block: * * $ export "FORTIOS_IMPORT_TABLE"="false" * * ```sh * $ pulumi import fortios:system/geneve:Geneve labelname {{name}} * ``` * * $ unset "FORTIOS_IMPORT_TABLE" */ class Geneve extends pulumi.CustomResource { /** * Get an existing Geneve 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 Geneve(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Geneve. 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'] === Geneve.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dstport"] = state ? state.dstport : undefined; resourceInputs["interface"] = state ? state.interface : undefined; resourceInputs["ipVersion"] = state ? state.ipVersion : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["remoteIp"] = state ? state.remoteIp : undefined; resourceInputs["remoteIp6"] = state ? state.remoteIp6 : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["vdomparam"] = state ? state.vdomparam : undefined; resourceInputs["vni"] = state ? state.vni : undefined; } else { const args = argsOrState; if ((!args || args.interface === undefined) && !opts.urn) { throw new Error("Missing required property 'interface'"); } if ((!args || args.ipVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'ipVersion'"); } if ((!args || args.remoteIp === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteIp'"); } if ((!args || args.vni === undefined) && !opts.urn) { throw new Error("Missing required property 'vni'"); } resourceInputs["dstport"] = args ? args.dstport : undefined; resourceInputs["interface"] = args ? args.interface : undefined; resourceInputs["ipVersion"] = args ? args.ipVersion : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["remoteIp"] = args ? args.remoteIp : undefined; resourceInputs["remoteIp6"] = args ? args.remoteIp6 : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["vdomparam"] = args ? args.vdomparam : undefined; resourceInputs["vni"] = args ? args.vni : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Geneve.__pulumiType, name, resourceInputs, opts); } } exports.Geneve = Geneve; /** @internal */ Geneve.__pulumiType = 'fortios:system/geneve:Geneve'; //# sourceMappingURL=geneve.js.map