UNPKG

@pulumi/vault

Version:

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

119 lines 4.19 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.GroupMemberGroupIds = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages member groups for an Identity Group for Vault. The * [Identity secrets engine](https://www.vaultproject.io/docs/secrets/identity/index.html) * is the identity management solution for Vault. * * ## Example Usage * * ### Exclusive Member Groups * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const internal = new vault.identity.Group("internal", { * name: "internal", * type: "internal", * externalMemberGroupIds: true, * metadata: { * version: "2", * }, * }); * const users = new vault.identity.Group("users", { * name: "users", * metadata: { * version: "2", * }, * }); * const members = new vault.identity.GroupMemberGroupIds("members", { * exclusive: true, * memberGroupIds: [users.id], * groupId: internal.id, * }); * ``` * * ### Non-Exclusive Member Groups * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const internal = new vault.identity.Group("internal", { * name: "internal", * type: "internal", * externalMemberGroupIds: true, * metadata: { * version: "2", * }, * }); * const users = new vault.identity.Group("users", { * name: "users", * metadata: { * version: "2", * }, * }); * const members = new vault.identity.GroupMemberGroupIds("members", { * exclusive: false, * memberGroupIds: [users.id], * groupId: internal.id, * }); * ``` */ class GroupMemberGroupIds extends pulumi.CustomResource { /** * Get an existing GroupMemberGroupIds 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 GroupMemberGroupIds(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of GroupMemberGroupIds. 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'] === GroupMemberGroupIds.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["exclusive"] = state?.exclusive; resourceInputs["groupId"] = state?.groupId; resourceInputs["memberGroupIds"] = state?.memberGroupIds; resourceInputs["namespace"] = state?.namespace; } else { const args = argsOrState; if (args?.groupId === undefined && !opts.urn) { throw new Error("Missing required property 'groupId'"); } resourceInputs["exclusive"] = args?.exclusive; resourceInputs["groupId"] = args?.groupId; resourceInputs["memberGroupIds"] = args?.memberGroupIds; resourceInputs["namespace"] = args?.namespace; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GroupMemberGroupIds.__pulumiType, name, resourceInputs, opts); } } exports.GroupMemberGroupIds = GroupMemberGroupIds; /** @internal */ GroupMemberGroupIds.__pulumiType = 'vault:identity/groupMemberGroupIds:GroupMemberGroupIds'; //# sourceMappingURL=groupMemberGroupIds.js.map