@pulumi/vault
Version:
A Pulumi package for creating and managing HashiCorp Vault cloud resources.
109 lines • 4.71 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.OciAuthBackendRole = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vault from "@pulumi/vault";
*
* const oci = new vault.OciAuthBackend("oci", {
* path: "oci",
* homeTenancyId: "ocid1.tenancy.oc1..aaaaaaaah7zkvaffv26pzyauoe2zbnionqvhvsexamplee557wakiofi4ysgqq",
* });
* const example = new vault.OciAuthBackendRole("example", {
* backend: oci.path,
* name: "test-role",
* ocidLists: [
* "ocid1.group.oc1..aaaaaaaabmyiinfq32y5aha3r2yo4exampleo4yg3fjk2sbne4567tropaa",
* "ocid1.dynamicgroup.oc1..aaaaaaaabvfwct33xri5examplegov4zyjp3rd5d7sk9jjdggxijhco56hrq",
* ],
* tokenTtl: 60,
* tokenMaxTtl: 120,
* tokenPolicies: [
* "default",
* "dev",
* "prod",
* ],
* });
* ```
*
* ## Import
*
* OCI auth backend roles can be imported using `auth/`, the `backend` path, `/role/`, and the `role` name e.g.
*
* ```sh
* $ pulumi import vault:index/ociAuthBackendRole:OciAuthBackendRole example auth/oci/role/test-role
* ```
*/
class OciAuthBackendRole extends pulumi.CustomResource {
/**
* Get an existing OciAuthBackendRole 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 OciAuthBackendRole(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of OciAuthBackendRole. 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'] === OciAuthBackendRole.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backend"] = state?.backend;
resourceInputs["name"] = state?.name;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["ocidLists"] = state?.ocidLists;
resourceInputs["tokenBoundCidrs"] = state?.tokenBoundCidrs;
resourceInputs["tokenExplicitMaxTtl"] = state?.tokenExplicitMaxTtl;
resourceInputs["tokenMaxTtl"] = state?.tokenMaxTtl;
resourceInputs["tokenNoDefaultPolicy"] = state?.tokenNoDefaultPolicy;
resourceInputs["tokenNumUses"] = state?.tokenNumUses;
resourceInputs["tokenPeriod"] = state?.tokenPeriod;
resourceInputs["tokenPolicies"] = state?.tokenPolicies;
resourceInputs["tokenTtl"] = state?.tokenTtl;
resourceInputs["tokenType"] = state?.tokenType;
}
else {
const args = argsOrState;
resourceInputs["backend"] = args?.backend;
resourceInputs["name"] = args?.name;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["ocidLists"] = args?.ocidLists;
resourceInputs["tokenBoundCidrs"] = args?.tokenBoundCidrs;
resourceInputs["tokenExplicitMaxTtl"] = args?.tokenExplicitMaxTtl;
resourceInputs["tokenMaxTtl"] = args?.tokenMaxTtl;
resourceInputs["tokenNoDefaultPolicy"] = args?.tokenNoDefaultPolicy;
resourceInputs["tokenNumUses"] = args?.tokenNumUses;
resourceInputs["tokenPeriod"] = args?.tokenPeriod;
resourceInputs["tokenPolicies"] = args?.tokenPolicies;
resourceInputs["tokenTtl"] = args?.tokenTtl;
resourceInputs["tokenType"] = args?.tokenType;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OciAuthBackendRole.__pulumiType, name, resourceInputs, opts);
}
}
exports.OciAuthBackendRole = OciAuthBackendRole;
/** @internal */
OciAuthBackendRole.__pulumiType = 'vault:index/ociAuthBackendRole:OciAuthBackendRole';
//# sourceMappingURL=ociAuthBackendRole.js.map