@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
127 lines • 5.75 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.Psk = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This data source provides the list of Site PSKs.
*
* A multi PSK (Pre-Shared Key) is a feature that allows the use of multiple PSKs for securing network connections.\
* It provides a simple and comprehensive way to onboard client devices without relying on client mac addresses.\
* Each psk has its own key name, which can be used for user-level accountability, key rotation, and visibility in the management platform. It supports the creation, rotation, and auto-expiration of psks, and allows vlan assignment and role assignment for dynamic per-user policies.\
* Multi PSKs create virtual broadcast domains and can be used for end-user onboarding via authenticated sso login.
*
* Mist supports two methods of Site PSKs lookup:
* * local
* * radius
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as junipermist from "@pulumi/juniper-mist";
*
* const pskOne = new junipermist.site.Psk("psk_one", {
* siteId: terraformSite.id,
* name: "JNP-FR-PAR",
* passphrase: "secretone",
* ssid: wlanOne.ssid,
* usage: "multi",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `mist_site_psk` with:
*
* Site PSK can be imported by specifying the site_id and the psk_id
*
* ```sh
* $ pulumi import junipermist:site/psk:Psk psk_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
* ```
*/
class Psk extends pulumi.CustomResource {
/**
* Get an existing Psk 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 Psk(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Psk. 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'] === Psk.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["email"] = state?.email;
resourceInputs["expireTime"] = state?.expireTime;
resourceInputs["expiryNotificationTime"] = state?.expiryNotificationTime;
resourceInputs["mac"] = state?.mac;
resourceInputs["name"] = state?.name;
resourceInputs["note"] = state?.note;
resourceInputs["notifyExpiry"] = state?.notifyExpiry;
resourceInputs["notifyOnCreateOrEdit"] = state?.notifyOnCreateOrEdit;
resourceInputs["oldPassphrase"] = state?.oldPassphrase;
resourceInputs["orgId"] = state?.orgId;
resourceInputs["passphrase"] = state?.passphrase;
resourceInputs["role"] = state?.role;
resourceInputs["siteId"] = state?.siteId;
resourceInputs["ssid"] = state?.ssid;
resourceInputs["usage"] = state?.usage;
resourceInputs["vlanId"] = state?.vlanId;
}
else {
const args = argsOrState;
if (args?.passphrase === undefined && !opts.urn) {
throw new Error("Missing required property 'passphrase'");
}
if (args?.siteId === undefined && !opts.urn) {
throw new Error("Missing required property 'siteId'");
}
if (args?.ssid === undefined && !opts.urn) {
throw new Error("Missing required property 'ssid'");
}
resourceInputs["email"] = args?.email;
resourceInputs["expireTime"] = args?.expireTime;
resourceInputs["expiryNotificationTime"] = args?.expiryNotificationTime;
resourceInputs["mac"] = args?.mac;
resourceInputs["name"] = args?.name;
resourceInputs["note"] = args?.note;
resourceInputs["notifyExpiry"] = args?.notifyExpiry;
resourceInputs["notifyOnCreateOrEdit"] = args?.notifyOnCreateOrEdit;
resourceInputs["oldPassphrase"] = args?.oldPassphrase ? pulumi.secret(args.oldPassphrase) : undefined;
resourceInputs["passphrase"] = args?.passphrase ? pulumi.secret(args.passphrase) : undefined;
resourceInputs["role"] = args?.role;
resourceInputs["siteId"] = args?.siteId;
resourceInputs["ssid"] = args?.ssid;
resourceInputs["usage"] = args?.usage;
resourceInputs["vlanId"] = args?.vlanId;
resourceInputs["orgId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["oldPassphrase", "passphrase"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Psk.__pulumiType, name, resourceInputs, opts);
}
}
exports.Psk = Psk;
/** @internal */
Psk.__pulumiType = 'junipermist:site/psk:Psk';
//# sourceMappingURL=psk.js.map