@pulumiverse/fortios
Version:
A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0
171 lines • 8.89 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.Local = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Configure local users.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const trname3 = new fortios.user.Ldap("trname3", {
* accountKeyFilter: "(&(userPrincipalName=%s)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))",
* accountKeyProcessing: "same",
* cnid: "cn",
* dn: "EIWNCIEW",
* groupMemberCheck: "user-attr",
* groupObjectFilter: "(&(objectcategory=group)(member=*))",
* memberAttr: "memberOf",
* passwordExpiryWarning: "disable",
* passwordRenewal: "disable",
* port: 389,
* secure: "disable",
* server: "1.1.1.1",
* serverIdentityCheck: "disable",
* sourceIp: "0.0.0.0",
* sslMinProtoVersion: "default",
* type: "simple",
* });
* const trname = new fortios.user.Local("trname", {
* authConcurrentOverride: "disable",
* authConcurrentValue: 0,
* authtimeout: 0,
* ldapServer: trname3.name,
* passwdTime: "0000-00-00 00:00:00",
* smsServer: "fortiguard",
* status: "enable",
* twoFactor: "disable",
* type: "ldap",
* });
* ```
*
* ## Import
*
* User Local can be imported using any of these accepted formats:
*
* ```sh
* $ pulumi import fortios:user/local:Local labelname {{name}}
* ```
*
* If you do not want to import arguments of block:
*
* $ export "FORTIOS_IMPORT_TABLE"="false"
*
* ```sh
* $ pulumi import fortios:user/local:Local labelname {{name}}
* ```
*
* $ unset "FORTIOS_IMPORT_TABLE"
*/
class Local extends pulumi.CustomResource {
/**
* Get an existing Local 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 Local(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Local. 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'] === Local.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authConcurrentOverride"] = state ? state.authConcurrentOverride : undefined;
resourceInputs["authConcurrentValue"] = state ? state.authConcurrentValue : undefined;
resourceInputs["authtimeout"] = state ? state.authtimeout : undefined;
resourceInputs["emailTo"] = state ? state.emailTo : undefined;
resourceInputs["fortitoken"] = state ? state.fortitoken : undefined;
resourceInputs["fosid"] = state ? state.fosid : undefined;
resourceInputs["ldapServer"] = state ? state.ldapServer : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["passwd"] = state ? state.passwd : undefined;
resourceInputs["passwdPolicy"] = state ? state.passwdPolicy : undefined;
resourceInputs["passwdTime"] = state ? state.passwdTime : undefined;
resourceInputs["ppkIdentity"] = state ? state.ppkIdentity : undefined;
resourceInputs["ppkSecret"] = state ? state.ppkSecret : undefined;
resourceInputs["qkdProfile"] = state ? state.qkdProfile : undefined;
resourceInputs["radiusServer"] = state ? state.radiusServer : undefined;
resourceInputs["smsCustomServer"] = state ? state.smsCustomServer : undefined;
resourceInputs["smsPhone"] = state ? state.smsPhone : undefined;
resourceInputs["smsServer"] = state ? state.smsServer : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tacacsServer"] = state ? state.tacacsServer : undefined;
resourceInputs["twoFactor"] = state ? state.twoFactor : undefined;
resourceInputs["twoFactorAuthentication"] = state ? state.twoFactorAuthentication : undefined;
resourceInputs["twoFactorNotification"] = state ? state.twoFactorNotification : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["usernameCaseInsensitivity"] = state ? state.usernameCaseInsensitivity : undefined;
resourceInputs["usernameCaseSensitivity"] = state ? state.usernameCaseSensitivity : undefined;
resourceInputs["usernameSensitivity"] = state ? state.usernameSensitivity : undefined;
resourceInputs["vdomparam"] = state ? state.vdomparam : undefined;
resourceInputs["workstation"] = state ? state.workstation : undefined;
}
else {
const args = argsOrState;
if ((!args || args.status === undefined) && !opts.urn) {
throw new Error("Missing required property 'status'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["authConcurrentOverride"] = args ? args.authConcurrentOverride : undefined;
resourceInputs["authConcurrentValue"] = args ? args.authConcurrentValue : undefined;
resourceInputs["authtimeout"] = args ? args.authtimeout : undefined;
resourceInputs["emailTo"] = args ? args.emailTo : undefined;
resourceInputs["fortitoken"] = args ? args.fortitoken : undefined;
resourceInputs["fosid"] = args ? args.fosid : undefined;
resourceInputs["ldapServer"] = args ? args.ldapServer : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["passwd"] = (args === null || args === void 0 ? void 0 : args.passwd) ? pulumi.secret(args.passwd) : undefined;
resourceInputs["passwdPolicy"] = args ? args.passwdPolicy : undefined;
resourceInputs["passwdTime"] = args ? args.passwdTime : undefined;
resourceInputs["ppkIdentity"] = args ? args.ppkIdentity : undefined;
resourceInputs["ppkSecret"] = (args === null || args === void 0 ? void 0 : args.ppkSecret) ? pulumi.secret(args.ppkSecret) : undefined;
resourceInputs["qkdProfile"] = args ? args.qkdProfile : undefined;
resourceInputs["radiusServer"] = args ? args.radiusServer : undefined;
resourceInputs["smsCustomServer"] = args ? args.smsCustomServer : undefined;
resourceInputs["smsPhone"] = args ? args.smsPhone : undefined;
resourceInputs["smsServer"] = args ? args.smsServer : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["tacacsServer"] = args ? args.tacacsServer : undefined;
resourceInputs["twoFactor"] = args ? args.twoFactor : undefined;
resourceInputs["twoFactorAuthentication"] = args ? args.twoFactorAuthentication : undefined;
resourceInputs["twoFactorNotification"] = args ? args.twoFactorNotification : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["usernameCaseInsensitivity"] = args ? args.usernameCaseInsensitivity : undefined;
resourceInputs["usernameCaseSensitivity"] = args ? args.usernameCaseSensitivity : undefined;
resourceInputs["usernameSensitivity"] = args ? args.usernameSensitivity : undefined;
resourceInputs["vdomparam"] = args ? args.vdomparam : undefined;
resourceInputs["workstation"] = args ? args.workstation : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["passwd", "ppkSecret"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Local.__pulumiType, name, resourceInputs, opts);
}
}
exports.Local = Local;
/** @internal */
Local.__pulumiType = 'fortios:user/local:Local';
//# sourceMappingURL=local.js.map
;