UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

110 lines 5.58 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.ServiceendpointGcpTerraform = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * visibility: "private", * versionControl: "Git", * workItemTemplate: "Agile", * description: "Managed by Pulumi", * }); * const exampleServiceendpointGcpTerraform = new azuredevops.ServiceendpointGcpTerraform("example", { * projectId: example.id, * tokenUri: "https://oauth2.example.com/token", * clientEmail: "gcp-sa-example@example.iam.gserviceaccount.com", * privateKey: "0000000000000000000000000000000000000", * serviceEndpointName: "Example GCP Terraform extension", * gcpProjectId: "Example GCP Project", * description: "Managed by Pulumi", * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.1 - Service Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.1) * * ## Import * * Azure DevOps GCP for Terraform Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID** * * ```sh * $ pulumi import azuredevops:index/serviceendpointGcpTerraform:ServiceendpointGcpTerraform azuredevops_serviceendpoint_gcp_terraform.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` */ class ServiceendpointGcpTerraform extends pulumi.CustomResource { /** * Get an existing ServiceendpointGcpTerraform 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 ServiceendpointGcpTerraform(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceendpointGcpTerraform. 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'] === ServiceendpointGcpTerraform.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authorization"] = state ? state.authorization : undefined; resourceInputs["clientEmail"] = state ? state.clientEmail : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["gcpProjectId"] = state ? state.gcpProjectId : undefined; resourceInputs["privateKey"] = state ? state.privateKey : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["scope"] = state ? state.scope : undefined; resourceInputs["serviceEndpointName"] = state ? state.serviceEndpointName : undefined; resourceInputs["tokenUri"] = state ? state.tokenUri : undefined; } else { const args = argsOrState; if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.serviceEndpointName === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceEndpointName'"); } resourceInputs["clientEmail"] = args ? args.clientEmail : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["gcpProjectId"] = args ? args.gcpProjectId : undefined; resourceInputs["privateKey"] = (args === null || args === void 0 ? void 0 : args.privateKey) ? pulumi.secret(args.privateKey) : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["scope"] = args ? args.scope : undefined; resourceInputs["serviceEndpointName"] = args ? args.serviceEndpointName : undefined; resourceInputs["tokenUri"] = args ? args.tokenUri : undefined; resourceInputs["authorization"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["privateKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ServiceendpointGcpTerraform.__pulumiType, name, resourceInputs, opts); } } exports.ServiceendpointGcpTerraform = ServiceendpointGcpTerraform; /** @internal */ ServiceendpointGcpTerraform.__pulumiType = 'azuredevops:index/serviceendpointGcpTerraform:ServiceendpointGcpTerraform'; //# sourceMappingURL=serviceendpointGcpTerraform.js.map