UNPKG

@pulumi/nomad

Version:

A Pulumi package for creating and managing nomad cloud resources.

107 lines 4.34 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.AclAuthMethod = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages an ACL Auth Method in Nomad. * * ## Example Usage * * Creating an ALC Auth Method: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nomad from "@pulumi/nomad"; * * const myNomadAclAuthMethod = new nomad.AclAuthMethod("my_nomad_acl_auth_method", { * name: "my-nomad-acl-auth-method", * type: "OIDC", * tokenLocality: "global", * maxTokenTtl: "10m0s", * tokenNameFormat: `${auth_method_type}-${value.user}`, * "default": true, * config: { * oidcDiscoveryUrl: "https://uk.auth0.com/", * oidcClientId: "someclientid", * oidcClientSecret: "someclientsecret-t", * boundAudiences: ["someclientid"], * allowedRedirectUris: [ * "http://localhost:4649/oidc/callback", * "http://localhost:4646/ui/settings/tokens", * ], * listClaimMappings: { * "http://nomad.internal/roles": "roles", * }, * }, * }); * ``` */ class AclAuthMethod extends pulumi.CustomResource { /** * Get an existing AclAuthMethod 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 AclAuthMethod(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AclAuthMethod. 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'] === AclAuthMethod.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["config"] = state?.config; resourceInputs["default"] = state?.default; resourceInputs["maxTokenTtl"] = state?.maxTokenTtl; resourceInputs["name"] = state?.name; resourceInputs["tokenLocality"] = state?.tokenLocality; resourceInputs["tokenNameFormat"] = state?.tokenNameFormat; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.config === undefined && !opts.urn) { throw new Error("Missing required property 'config'"); } if (args?.maxTokenTtl === undefined && !opts.urn) { throw new Error("Missing required property 'maxTokenTtl'"); } if (args?.tokenLocality === undefined && !opts.urn) { throw new Error("Missing required property 'tokenLocality'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["config"] = args?.config; resourceInputs["default"] = args?.default; resourceInputs["maxTokenTtl"] = args?.maxTokenTtl; resourceInputs["name"] = args?.name; resourceInputs["tokenLocality"] = args?.tokenLocality; resourceInputs["tokenNameFormat"] = args?.tokenNameFormat; resourceInputs["type"] = args?.type; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AclAuthMethod.__pulumiType, name, resourceInputs, opts); } } exports.AclAuthMethod = AclAuthMethod; /** @internal */ AclAuthMethod.__pulumiType = 'nomad:index/aclAuthMethod:AclAuthMethod'; //# sourceMappingURL=aclAuthMethod.js.map