UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

185 lines 7.42 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.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 "@pulumi/harness"; * * const manualConfigSecret = new harness.platform.AzureCloudProviderConnector("manual_config_secret", { * identifier: "identifier", * name: "name", * description: "example", * tags: ["foo:bar"], * credentials: { * type: "ManualConfig", * azureManualDetails: { * applicationId: "application_id", * tenantId: "tenant_id", * auth: { * type: "Secret", * azureClientSecretKey: { * secretRef: `account.${test.id}`, * }, * }, * }, * }, * azureEnvironmentType: "AZURE", * delegateSelectors: ["harness-delegate"], * }); * const manualConfigCertificate = new harness.platform.AzureCloudProviderConnector("manual_config_certificate", { * identifier: "identifier", * name: "name", * description: "example", * tags: ["foo:bar"], * credentials: { * type: "ManualConfig", * azureManualDetails: { * applicationId: "application_id", * tenantId: "tenant_id", * auth: { * type: "Certificate", * azureClientKeyCert: { * certificateRef: `account.${test.id}`, * }, * }, * }, * }, * azureEnvironmentType: "AZURE", * delegateSelectors: ["harness-delegate"], * }); * const inheritFromDelegateUserAssignedManagedIdentity = new harness.platform.AzureCloudProviderConnector("inherit_from_delegate_user_assigned_managed_identity", { * identifier: "identifier", * name: "name", * description: "example", * tags: ["foo:bar"], * credentials: { * type: "InheritFromDelegate", * azureInheritFromDelegateDetails: { * auth: { * azureMsiAuthUa: { * clientId: "client_id", * }, * type: "UserAssignedManagedIdentity", * }, * }, * }, * azureEnvironmentType: "AZURE", * delegateSelectors: ["harness-delegate"], * }); * const inheritFromDelegateSystemAssignedManagedIdentity = new harness.platform.AzureCloudProviderConnector("inherit_from_delegate_system_assigned_managed_identity", { * identifier: "identifier", * name: "name", * description: "example", * tags: ["foo:bar"], * credentials: { * type: "InheritFromDelegate", * azureInheritFromDelegateDetails: { * auth: { * type: "SystemAssignedManagedIdentity", * }, * }, * }, * azureEnvironmentType: "AZURE", * delegateSelectors: ["harness-delegate"], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * 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, { ...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?.azureEnvironmentType; resourceInputs["credentials"] = state?.credentials; resourceInputs["delegateSelectors"] = state?.delegateSelectors; resourceInputs["description"] = state?.description; resourceInputs["executeOnDelegate"] = state?.executeOnDelegate; resourceInputs["forceDelete"] = state?.forceDelete; resourceInputs["identifier"] = state?.identifier; resourceInputs["name"] = state?.name; resourceInputs["orgId"] = state?.orgId; resourceInputs["projectId"] = state?.projectId; resourceInputs["tags"] = state?.tags; } else { const args = argsOrState; if (args?.credentials === undefined && !opts.urn) { throw new Error("Missing required property 'credentials'"); } if (args?.identifier === undefined && !opts.urn) { throw new Error("Missing required property 'identifier'"); } resourceInputs["azureEnvironmentType"] = args?.azureEnvironmentType; resourceInputs["credentials"] = args?.credentials; resourceInputs["delegateSelectors"] = args?.delegateSelectors; resourceInputs["description"] = args?.description; resourceInputs["executeOnDelegate"] = args?.executeOnDelegate; resourceInputs["forceDelete"] = args?.forceDelete; resourceInputs["identifier"] = args?.identifier; resourceInputs["name"] = args?.name; resourceInputs["orgId"] = args?.orgId; resourceInputs["projectId"] = args?.projectId; resourceInputs["tags"] = args?.tags; } 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