UNPKG

@lbrlabs/pulumi-harness

Version:

A Pulumi package for creating and managing Harness resources.

177 lines 7.65 kB
"use strict"; // *** 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.AzureCloudProviderConnector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating an Azure Cloud Provider in Harness. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@lbrlabs/pulumi-harness"; * * const manualConfigSecret = new harness.platform.AzureCloudProviderConnector("manualConfigSecret", { * azureEnvironmentType: "AZURE", * credentials: { * azureManualDetails: { * applicationId: "application_id", * auth: { * azureClientSecretKey: { * secretRef: `account.${harness_platform_secret_text.test.id}`, * }, * type: "Secret", * }, * tenantId: "tenant_id", * }, * type: "ManualConfig", * }, * delegateSelectors: ["harness-delegate"], * description: "example", * identifier: "identifier", * tags: ["foo:bar"], * }); * const manualConfigCertificate = new harness.platform.AzureCloudProviderConnector("manualConfigCertificate", { * azureEnvironmentType: "AZURE", * credentials: { * azureManualDetails: { * applicationId: "application_id", * auth: { * azureClientKeyCert: { * certificateRef: `account.${harness_platform_secret_text.test.id}`, * }, * type: "Certificate", * }, * tenantId: "tenant_id", * }, * type: "ManualConfig", * }, * delegateSelectors: ["harness-delegate"], * description: "example", * identifier: "identifier", * tags: ["foo:bar"], * }); * const inheritFromDelegateUserAssignedManagedIdentity = new harness.platform.AzureCloudProviderConnector("inheritFromDelegateUserAssignedManagedIdentity", { * azureEnvironmentType: "AZURE", * credentials: { * azureInheritFromDelegateDetails: { * auth: { * azureMsiAuthUa: { * clientId: "client_id", * }, * type: "UserAssignedManagedIdentity", * }, * }, * type: "InheritFromDelegate", * }, * delegateSelectors: ["harness-delegate"], * description: "example", * identifier: "identifier", * tags: ["foo:bar"], * }); * const inheritFromDelegateSystemAssignedManagedIdentity = new harness.platform.AzureCloudProviderConnector("inheritFromDelegateSystemAssignedManagedIdentity", { * azureEnvironmentType: "AZURE", * credentials: { * azureInheritFromDelegateDetails: { * auth: { * type: "SystemAssignedManagedIdentity", * }, * }, * type: "InheritFromDelegate", * }, * delegateSelectors: ["harness-delegate"], * description: "example", * identifier: "identifier", * tags: ["foo:bar"], * }); * ``` * * ## Import * * Import account level azure cloud provider connector * * ```sh * $ pulumi import harness:platform/azureCloudProviderConnector:AzureCloudProviderConnector example <connector_id> * ``` * * Import org level azure cloud provider connector * * ```sh * $ pulumi import harness:platform/azureCloudProviderConnector:AzureCloudProviderConnector example <ord_id>/<connector_id> * ``` * * Import project level azure cloud provider connector * * ```sh * $ pulumi import harness:platform/azureCloudProviderConnector:AzureCloudProviderConnector example <org_id>/<project_id>/<connector_id> * ``` */ class AzureCloudProviderConnector extends pulumi.CustomResource { /** * Get an existing AzureCloudProviderConnector 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 AzureCloudProviderConnector(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AzureCloudProviderConnector. 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'] === AzureCloudProviderConnector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["azureEnvironmentType"] = state ? state.azureEnvironmentType : undefined; resourceInputs["credentials"] = state ? state.credentials : undefined; resourceInputs["delegateSelectors"] = state ? state.delegateSelectors : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["executeOnDelegate"] = state ? state.executeOnDelegate : undefined; resourceInputs["identifier"] = state ? state.identifier : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.credentials === undefined) && !opts.urn) { throw new Error("Missing required property 'credentials'"); } if ((!args || args.identifier === undefined) && !opts.urn) { throw new Error("Missing required property 'identifier'"); } resourceInputs["azureEnvironmentType"] = args ? args.azureEnvironmentType : undefined; resourceInputs["credentials"] = args ? args.credentials : undefined; resourceInputs["delegateSelectors"] = args ? args.delegateSelectors : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["executeOnDelegate"] = args ? args.executeOnDelegate : undefined; resourceInputs["identifier"] = args ? args.identifier : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AzureCloudProviderConnector.__pulumiType, name, resourceInputs, opts); } } exports.AzureCloudProviderConnector = AzureCloudProviderConnector; /** @internal */ AzureCloudProviderConnector.__pulumiType = 'harness:platform/azureCloudProviderConnector:AzureCloudProviderConnector'; //# sourceMappingURL=azureCloudProviderConnector.js.map