UNPKG

@pulumi/vault

Version:

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

117 lines 4.47 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.GroupMemberEntityIds = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages member entities 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 Entities * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const internal = new vault.identity.Group("internal", { * name: "internal", * type: "internal", * externalMemberEntityIds: true, * metadata: { * version: "2", * }, * }); * const user = new vault.identity.Entity("user", {name: "user"}); * const members = new vault.identity.GroupMemberEntityIds("members", { * exclusive: true, * memberEntityIds: [user.id], * groupId: internal.id, * }); * ``` * * ### Non-exclusive Member Entities * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const internal = new vault.identity.Group("internal", { * name: "internal", * type: "internal", * externalMemberEntityIds: true, * metadata: { * version: "2", * }, * }); * const testUser = new vault.identity.Entity("test_user", {name: "test"}); * const secondTestUser = new vault.identity.Entity("second_test_user", {name: "second_test"}); * const devUser = new vault.identity.Entity("dev_user", {name: "dev"}); * const test = new vault.identity.GroupMemberEntityIds("test", { * memberEntityIds: [ * testUser.id, * secondTestUser.id, * ], * exclusive: false, * groupId: internal.id, * }); * const others = new vault.identity.GroupMemberEntityIds("others", { * memberEntityIds: [devUser.id], * exclusive: false, * groupId: internal.id, * }); * ``` */ class GroupMemberEntityIds extends pulumi.CustomResource { /** * Get an existing GroupMemberEntityIds 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 GroupMemberEntityIds(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of GroupMemberEntityIds. 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'] === GroupMemberEntityIds.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["exclusive"] = state?.exclusive; resourceInputs["groupId"] = state?.groupId; resourceInputs["memberEntityIds"] = state?.memberEntityIds; 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["memberEntityIds"] = args?.memberEntityIds; resourceInputs["namespace"] = args?.namespace; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GroupMemberEntityIds.__pulumiType, name, resourceInputs, opts); } } exports.GroupMemberEntityIds = GroupMemberEntityIds; /** @internal */ GroupMemberEntityIds.__pulumiType = 'vault:identity/groupMemberEntityIds:GroupMemberEntityIds'; //# sourceMappingURL=groupMemberEntityIds.js.map