@lbrlabs/pulumi-harness
Version:
A Pulumi package for creating and managing Harness resources.
136 lines • 6.47 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AzureKeyVaultConnector = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for creating an Azure key vault in Harness.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@lbrlabs/pulumi-harness";
*
* const example = new harness.platform.AzureKeyVaultConnector("example", {
* azureEnvironmentType: "AZURE",
* clientId: "client_id",
* description: "example",
* identifier: "identifier",
* isDefault: false,
* secretKey: "account.secret_key",
* subscription: "subscription",
* tags: ["foo:bar"],
* tenantId: "tenant_id",
* vaultName: "vault_name",
* });
* ```
*
* ## Import
*
* Import account level azure key vault connector
*
* ```sh
* $ pulumi import harness:platform/azureKeyVaultConnector:AzureKeyVaultConnector example <connector_id>
* ```
*
* Import org level azure key vault connector
*
* ```sh
* $ pulumi import harness:platform/azureKeyVaultConnector:AzureKeyVaultConnector example <ord_id>/<connector_id>
* ```
*
* Import project level azure key vault connector
*
* ```sh
* $ pulumi import harness:platform/azureKeyVaultConnector:AzureKeyVaultConnector example <org_id>/<project_id>/<connector_id>
* ```
*/
class AzureKeyVaultConnector extends pulumi.CustomResource {
/**
* Get an existing AzureKeyVaultConnector 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 AzureKeyVaultConnector(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AzureKeyVaultConnector. 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'] === AzureKeyVaultConnector.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["azureEnvironmentType"] = state ? state.azureEnvironmentType : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["delegateSelectors"] = state ? state.delegateSelectors : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["identifier"] = state ? state.identifier : undefined;
resourceInputs["isDefault"] = state ? state.isDefault : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["orgId"] = state ? state.orgId : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["secretKey"] = state ? state.secretKey : undefined;
resourceInputs["subscription"] = state ? state.subscription : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tenantId"] = state ? state.tenantId : undefined;
resourceInputs["vaultName"] = state ? state.vaultName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clientId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if ((!args || args.identifier === undefined) && !opts.urn) {
throw new Error("Missing required property 'identifier'");
}
if ((!args || args.secretKey === undefined) && !opts.urn) {
throw new Error("Missing required property 'secretKey'");
}
if ((!args || args.subscription === undefined) && !opts.urn) {
throw new Error("Missing required property 'subscription'");
}
if ((!args || args.tenantId === undefined) && !opts.urn) {
throw new Error("Missing required property 'tenantId'");
}
if ((!args || args.vaultName === undefined) && !opts.urn) {
throw new Error("Missing required property 'vaultName'");
}
resourceInputs["azureEnvironmentType"] = args ? args.azureEnvironmentType : undefined;
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["delegateSelectors"] = args ? args.delegateSelectors : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["identifier"] = args ? args.identifier : undefined;
resourceInputs["isDefault"] = args ? args.isDefault : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["orgId"] = args ? args.orgId : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["secretKey"] = args ? args.secretKey : undefined;
resourceInputs["subscription"] = args ? args.subscription : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["tenantId"] = args ? args.tenantId : undefined;
resourceInputs["vaultName"] = args ? args.vaultName : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AzureKeyVaultConnector.__pulumiType, name, resourceInputs, opts);
}
}
exports.AzureKeyVaultConnector = AzureKeyVaultConnector;
/** @internal */
AzureKeyVaultConnector.__pulumiType = 'harness:platform/azureKeyVaultConnector:AzureKeyVaultConnector';
//# sourceMappingURL=azureKeyVaultConnector.js.map