UNPKG

@pulumi/vault

Version:

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

113 lines 4.68 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.BackendRole = 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 azure = new vault.azure.Backend("azure", { * subscriptionId: subscriptionId, * tenantId: tenantId, * clientSecret: clientSecret, * clientId: clientId, * }); * const generatedRole = new vault.azure.BackendRole("generated_role", { * backend: azure.path, * role: "generated_role", * signInAudience: "AzureADMyOrg", * tags: [ * "team:engineering", * "environment:development", * ], * ttl: "300", * maxTtl: "600", * azureRoles: [{ * roleName: "Reader", * scope: `/subscriptions/${subscriptionId}/resourceGroups/azure-vault-group`, * }], * }); * const existingObjectId = new vault.azure.BackendRole("existing_object_id", { * backend: azure.path, * role: "existing_object_id", * applicationObjectId: "11111111-2222-3333-4444-44444444444", * ttl: "300", * maxTtl: "600", * }); * ``` */ class BackendRole extends pulumi.CustomResource { /** * Get an existing BackendRole 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 BackendRole(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of BackendRole. 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'] === BackendRole.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationObjectId"] = state?.applicationObjectId; resourceInputs["azureGroups"] = state?.azureGroups; resourceInputs["azureRoles"] = state?.azureRoles; resourceInputs["backend"] = state?.backend; resourceInputs["description"] = state?.description; resourceInputs["explicitMaxTtl"] = state?.explicitMaxTtl; resourceInputs["maxTtl"] = state?.maxTtl; resourceInputs["namespace"] = state?.namespace; resourceInputs["permanentlyDelete"] = state?.permanentlyDelete; resourceInputs["role"] = state?.role; resourceInputs["signInAudience"] = state?.signInAudience; resourceInputs["tags"] = state?.tags; resourceInputs["ttl"] = state?.ttl; } else { const args = argsOrState; if (args?.role === undefined && !opts.urn) { throw new Error("Missing required property 'role'"); } resourceInputs["applicationObjectId"] = args?.applicationObjectId; resourceInputs["azureGroups"] = args?.azureGroups; resourceInputs["azureRoles"] = args?.azureRoles; resourceInputs["backend"] = args?.backend; resourceInputs["description"] = args?.description; resourceInputs["explicitMaxTtl"] = args?.explicitMaxTtl; resourceInputs["maxTtl"] = args?.maxTtl; resourceInputs["namespace"] = args?.namespace; resourceInputs["permanentlyDelete"] = args?.permanentlyDelete; resourceInputs["role"] = args?.role; resourceInputs["signInAudience"] = args?.signInAudience; resourceInputs["tags"] = args?.tags; resourceInputs["ttl"] = args?.ttl; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BackendRole.__pulumiType, name, resourceInputs, opts); } } exports.BackendRole = BackendRole; /** @internal */ BackendRole.__pulumiType = 'vault:azure/backendRole:BackendRole'; //# sourceMappingURL=backendRole.js.map