UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

228 lines (227 loc) 8.73 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages an Openshift service endpoint within Azure DevOps organization. Using this service endpoint requires you to first install the [OpenShift Extension](https://marketplace.visualstudio.com/items?itemName=redhat.openshift-vsts). * * ## 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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", { * projectId: example.id, * serviceEndpointName: "Example Openshift", * serverUrl: "https://example.server", * certificateAuthorityFile: "/opt/file", * acceptUntrustedCerts: true, * authBasic: { * username: "username", * password: "password", * }, * }); * ``` * * ```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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", { * projectId: example.id, * serviceEndpointName: "Example Openshift", * serverUrl: "https://example.server", * certificateAuthorityFile: "/opt/file", * acceptUntrustedCerts: true, * authToken: { * token: "username", * }, * }); * ``` * ```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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", { * projectId: example.id, * serviceEndpointName: "Example Openshift", * serverUrl: "https://example.server", * authNone: { * kubeConfig: "config", * }, * }); * ``` * * ## 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 Openshift Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID** * * ```sh * $ pulumi import azuredevops:index/serviceendpointOpenshift:ServiceendpointOpenshift example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` */ export declare class ServiceendpointOpenshift extends pulumi.CustomResource { /** * Get an existing ServiceendpointOpenshift 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: string, id: pulumi.Input<pulumi.ID>, state?: ServiceendpointOpenshiftState, opts?: pulumi.CustomResourceOptions): ServiceendpointOpenshift; /** * Returns true if the given object is an instance of ServiceendpointOpenshift. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ServiceendpointOpenshift; /** * Set this option to allow clients to accept a self-signed certificate. Available when using `authBasic` or `authToken` authorization. */ readonly acceptUntrustedCerts: pulumi.Output<boolean | undefined>; /** * An `authBasic` block as documented below. */ readonly authBasic: pulumi.Output<outputs.ServiceendpointOpenshiftAuthBasic | undefined>; /** * An `authNone` block as documented below. */ readonly authNone: pulumi.Output<outputs.ServiceendpointOpenshiftAuthNone | undefined>; /** * An `authToken` block as documented below. */ readonly authToken: pulumi.Output<outputs.ServiceendpointOpenshiftAuthToken | undefined>; readonly authorization: pulumi.Output<{ [key: string]: string; }>; /** * The path to a certificate authority file to correctly and securely authenticates with an OpenShift server that uses HTTPS. Available when using `authBasic` or `authToken` authorization. */ readonly certificateAuthorityFile: pulumi.Output<string | undefined>; readonly description: pulumi.Output<string | undefined>; /** * The ID of the project. */ readonly projectId: pulumi.Output<string>; /** * The URL for the OpenShift cluster to connect to. */ readonly serverUrl: pulumi.Output<string | undefined>; /** * The Service Endpoint name. */ readonly serviceEndpointName: pulumi.Output<string>; /** * Create a ServiceendpointOpenshift resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServiceendpointOpenshiftArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceendpointOpenshift resources. */ export interface ServiceendpointOpenshiftState { /** * Set this option to allow clients to accept a self-signed certificate. Available when using `authBasic` or `authToken` authorization. */ acceptUntrustedCerts?: pulumi.Input<boolean>; /** * An `authBasic` block as documented below. */ authBasic?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthBasic>; /** * An `authNone` block as documented below. */ authNone?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthNone>; /** * An `authToken` block as documented below. */ authToken?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthToken>; authorization?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The path to a certificate authority file to correctly and securely authenticates with an OpenShift server that uses HTTPS. Available when using `authBasic` or `authToken` authorization. */ certificateAuthorityFile?: pulumi.Input<string>; description?: pulumi.Input<string>; /** * The ID of the project. */ projectId?: pulumi.Input<string>; /** * The URL for the OpenShift cluster to connect to. */ serverUrl?: pulumi.Input<string>; /** * The Service Endpoint name. */ serviceEndpointName?: pulumi.Input<string>; } /** * The set of arguments for constructing a ServiceendpointOpenshift resource. */ export interface ServiceendpointOpenshiftArgs { /** * Set this option to allow clients to accept a self-signed certificate. Available when using `authBasic` or `authToken` authorization. */ acceptUntrustedCerts?: pulumi.Input<boolean>; /** * An `authBasic` block as documented below. */ authBasic?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthBasic>; /** * An `authNone` block as documented below. */ authNone?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthNone>; /** * An `authToken` block as documented below. */ authToken?: pulumi.Input<inputs.ServiceendpointOpenshiftAuthToken>; /** * The path to a certificate authority file to correctly and securely authenticates with an OpenShift server that uses HTTPS. Available when using `authBasic` or `authToken` authorization. */ certificateAuthorityFile?: pulumi.Input<string>; description?: pulumi.Input<string>; /** * The ID of the project. */ projectId: pulumi.Input<string>; /** * The URL for the OpenShift cluster to connect to. */ serverUrl?: pulumi.Input<string>; /** * The Service Endpoint name. */ serviceEndpointName: pulumi.Input<string>; }