UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

185 lines 8.35 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.Networktemplate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages the Site Network configuration (Switch configuration). * * The Site Network template can be used to override the Org Network template assign to the site, or to configure common switch settings across the site without having to create an Org Network template. * * > When using the Mist APIs, all the switch settings defined at the site level are stored under the site settings with all the rest of the site configuration (`/api/v1/sites/{site_id}/setting` Mist API Endpoint). To simplify this resource, the `junipermist.site.Networktemplate` resource has been created to centralize all the site level switches related settings. * * !> Only ONE `junipermist.site.Networktemplate` resource can be configured per site. If multiple ones are configured, only the last one defined we be successfully deployed to Mist * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as junipermist from "@pulumi/juniper-mist"; * * const networktemplateOne = new junipermist.site.Networktemplate("networktemplate_one", { * siteId: terraformTest.id, * dnsServers: [ * "8.8.8.8", * "1.1.1.1", * ], * dnsSuffixes: ["mycorp.com"], * ntpServers: ["pool.ntp.org"], * additionalConfigCmds: [ * "set system hostname test", * "set system services ssh root-login allow", * ], * networks: { * network_one: { * vlanId: "10", * }, * network_two: { * vlanId: "11", * }, * }, * portUsages: { * trunk: { * allNetworks: true, * enableQos: true, * mode: "port_usage_one", * portNetwork: "network_one", * }, * }, * radiusConfig: { * acctInterimInterval: 60, * coaEnabled: true, * network: "network_one", * acctServers: [{ * host: "1.2.3.4", * secret: "secret", * }], * authServers: [{ * host: "1.2.3.4", * secret: "secret", * }], * }, * switchMatching: { * enable: true, * rules: [{ * name: "switch_rule_one", * matchName: "corp", * matchNameOffset: 3, * matchRole: "core", * portConfig: { * "ge-0/0/0-10": { * usage: "port_usage_one", * }, * }, * }], * }, * }); * ``` * * ## Import * * Using `pulumi import`, import `mist_site_networktemplate` with: * * Site Network Template can be imported by specifying the site_id * * ```sh * $ pulumi import junipermist:site/networktemplate:Networktemplate networktemplate_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a * ``` */ class Networktemplate extends pulumi.CustomResource { /** * Get an existing Networktemplate 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 Networktemplate(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Networktemplate. 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'] === Networktemplate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aclPolicies"] = state?.aclPolicies; resourceInputs["aclTags"] = state?.aclTags; resourceInputs["additionalConfigCmds"] = state?.additionalConfigCmds; resourceInputs["autoUpgradeLinecard"] = state?.autoUpgradeLinecard; resourceInputs["defaultPortUsage"] = state?.defaultPortUsage; resourceInputs["dhcpSnooping"] = state?.dhcpSnooping; resourceInputs["disabledSystemDefinedPortUsages"] = state?.disabledSystemDefinedPortUsages; resourceInputs["dnsServers"] = state?.dnsServers; resourceInputs["dnsSuffixes"] = state?.dnsSuffixes; resourceInputs["extraRoutes"] = state?.extraRoutes; resourceInputs["extraRoutes6"] = state?.extraRoutes6; resourceInputs["mistNac"] = state?.mistNac; resourceInputs["networks"] = state?.networks; resourceInputs["ntpServers"] = state?.ntpServers; resourceInputs["ospfAreas"] = state?.ospfAreas; resourceInputs["portMirroring"] = state?.portMirroring; resourceInputs["portUsages"] = state?.portUsages; resourceInputs["radiusConfig"] = state?.radiusConfig; resourceInputs["remoteSyslog"] = state?.remoteSyslog; resourceInputs["routingPolicies"] = state?.routingPolicies; resourceInputs["siteId"] = state?.siteId; resourceInputs["snmpConfig"] = state?.snmpConfig; resourceInputs["switchMatching"] = state?.switchMatching; resourceInputs["switchMgmt"] = state?.switchMgmt; resourceInputs["vrfConfig"] = state?.vrfConfig; resourceInputs["vrfInstances"] = state?.vrfInstances; } else { const args = argsOrState; if (args?.siteId === undefined && !opts.urn) { throw new Error("Missing required property 'siteId'"); } resourceInputs["aclPolicies"] = args?.aclPolicies; resourceInputs["aclTags"] = args?.aclTags; resourceInputs["additionalConfigCmds"] = args?.additionalConfigCmds; resourceInputs["autoUpgradeLinecard"] = args?.autoUpgradeLinecard; resourceInputs["defaultPortUsage"] = args?.defaultPortUsage; resourceInputs["dhcpSnooping"] = args?.dhcpSnooping; resourceInputs["disabledSystemDefinedPortUsages"] = args?.disabledSystemDefinedPortUsages; resourceInputs["dnsServers"] = args?.dnsServers; resourceInputs["dnsSuffixes"] = args?.dnsSuffixes; resourceInputs["extraRoutes"] = args?.extraRoutes; resourceInputs["extraRoutes6"] = args?.extraRoutes6; resourceInputs["mistNac"] = args?.mistNac; resourceInputs["networks"] = args?.networks; resourceInputs["ntpServers"] = args?.ntpServers; resourceInputs["ospfAreas"] = args?.ospfAreas; resourceInputs["portMirroring"] = args?.portMirroring; resourceInputs["portUsages"] = args?.portUsages; resourceInputs["radiusConfig"] = args?.radiusConfig; resourceInputs["remoteSyslog"] = args?.remoteSyslog; resourceInputs["routingPolicies"] = args?.routingPolicies; resourceInputs["siteId"] = args?.siteId; resourceInputs["snmpConfig"] = args?.snmpConfig; resourceInputs["switchMatching"] = args?.switchMatching; resourceInputs["switchMgmt"] = args?.switchMgmt; resourceInputs["vrfConfig"] = args?.vrfConfig; resourceInputs["vrfInstances"] = args?.vrfInstances; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Networktemplate.__pulumiType, name, resourceInputs, opts); } } exports.Networktemplate = Networktemplate; /** @internal */ Networktemplate.__pulumiType = 'junipermist:site/networktemplate:Networktemplate'; //# sourceMappingURL=networktemplate.js.map