@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
80 lines • 3.03 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.OidcScope = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages OIDC Scopes in a Vault server. See the [Vault documentation](https://www.vaultproject.io/api-docs/secret/identity/oidc-provider#create-or-update-a-scope)
* for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const groups = new vault.identity.OidcScope("groups", {
* name: "groups",
* template: "{\"groups\":{{identity.entity.groups.names}}}",
* description: "Vault OIDC Groups Scope",
* });
* ```
*
* ## Import
*
* OIDC Scopes can be imported using the `name`, e.g.
*
* ```sh
* $ pulumi import vault:identity/oidcScope:OidcScope groups groups
* ```
*/
class OidcScope extends pulumi.CustomResource {
/**
* Get an existing OidcScope 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 OidcScope(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of OidcScope. 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'] === OidcScope.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state?.description;
resourceInputs["name"] = state?.name;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["template"] = state?.template;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["name"] = args?.name;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["template"] = args?.template;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OidcScope.__pulumiType, name, resourceInputs, opts);
}
}
exports.OidcScope = OidcScope;
/** @internal */
OidcScope.__pulumiType = 'vault:identity/oidcScope:OidcScope';
//# sourceMappingURL=oidcScope.js.map