UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

294 lines (293 loc) 9.97 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for creating a K8s connector. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const clientKeyCert = new harness.platform.KubernetesConnector("clientKeyCert", { * identifier: "identifier", * name: "name", * description: "description", * tags: ["foo:bar"], * clientKeyCert: { * masterUrl: "https://kubernetes.example.com", * caCertRef: "account.TEST_k8ss_client_stuff", * clientCertRef: "account.test_k8s_client_cert", * clientKeyRef: "account.TEST_k8s_client_key", * clientKeyPassphraseRef: "account.TEST_k8s_client_test", * clientKeyAlgorithm: "RSA", * }, * delegateSelectors: ["harness-delegate"], * }); * const usernamePassword = new harness.platform.KubernetesConnector("usernamePassword", { * identifier: "identifier", * name: "name", * description: "description", * tags: ["foo:bar"], * usernamePassword: { * masterUrl: "https://kubernetes.example.com", * username: "admin", * passwordRef: "account.TEST_k8s_client_test", * }, * delegateSelectors: ["harness-delegate"], * }); * const serviceAccount = new harness.platform.KubernetesConnector("serviceAccount", { * identifier: "identifier", * name: "name", * description: "description", * tags: ["foo:bar"], * serviceAccount: { * masterUrl: "https://kubernetes.example.com", * serviceAccountTokenRef: "account.TEST_k8s_client_test", * }, * delegateSelectors: ["harness-delegate"], * }); * const openIDConnect = new harness.platform.KubernetesConnector("openIDConnect", { * identifier: "%[1]s", * name: "%[2]s", * description: "description", * tags: ["foo:bar"], * openidConnect: { * masterUrl: "https://kubernetes.example.com", * issuerUrl: "https://oidc.example.com", * usernameRef: "account.TEST_k8s_client_test", * clientIdRef: "account.TEST_k8s_client_test", * passwordRef: "account.TEST_k8s_client_test", * secretRef: "account.TEST_k8s_client_test", * scopes: [ * "scope1", * "scope2", * ], * }, * delegateSelectors: ["harness-delegate"], * }); * const inheritFromDelegate = new harness.platform.KubernetesConnector("inheritFromDelegate", { * identifier: "identifier", * name: "name", * description: "description", * tags: ["foo:bar"], * inheritFromDelegate: { * delegateSelectors: ["harness-delegate"], * }, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import account level kubernetes connector * * ```sh * $ pulumi import harness:platform/kubernetesConnector:KubernetesConnector example <connector_id> * ``` * * Import org level kubernetes connector * * ```sh * $ pulumi import harness:platform/kubernetesConnector:KubernetesConnector example <ord_id>/<connector_id> * ``` * * Import project level kubernetes connector * * ```sh * $ pulumi import harness:platform/kubernetesConnector:KubernetesConnector example <org_id>/<project_id>/<connector_id> * ``` */ export declare class KubernetesConnector extends pulumi.CustomResource { /** * Get an existing KubernetesConnector 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?: KubernetesConnectorState, opts?: pulumi.CustomResourceOptions): KubernetesConnector; /** * Returns true if the given object is an instance of KubernetesConnector. 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 KubernetesConnector; /** * Client key and certificate config for the connector. */ readonly clientKeyCert: pulumi.Output<outputs.platform.KubernetesConnectorClientKeyCert | undefined>; /** * Selectors to use for the delegate. */ readonly delegateSelectors: pulumi.Output<string[] | undefined>; /** * Description of the resource. */ readonly description: pulumi.Output<string | undefined>; /** * Enable this flag for force deletion of connector */ readonly forceDelete: pulumi.Output<boolean>; /** * Unique identifier of the resource. */ readonly identifier: pulumi.Output<string>; /** * Credentials are inherited from the delegate. */ readonly inheritFromDelegate: pulumi.Output<outputs.platform.KubernetesConnectorInheritFromDelegate | undefined>; /** * Name of the resource. */ readonly name: pulumi.Output<string>; /** * OpenID configuration for the connector. */ readonly openidConnect: pulumi.Output<outputs.platform.KubernetesConnectorOpenidConnect | undefined>; /** * Unique identifier of the organization. */ readonly orgId: pulumi.Output<string | undefined>; /** * Unique identifier of the project. */ readonly projectId: pulumi.Output<string | undefined>; /** * Service account for the connector. */ readonly serviceAccount: pulumi.Output<outputs.platform.KubernetesConnectorServiceAccount | undefined>; /** * Tags to associate with the resource. */ readonly tags: pulumi.Output<string[] | undefined>; /** * Username and password for the connector. */ readonly usernamePassword: pulumi.Output<outputs.platform.KubernetesConnectorUsernamePassword | undefined>; /** * Create a KubernetesConnector 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: KubernetesConnectorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KubernetesConnector resources. */ export interface KubernetesConnectorState { /** * Client key and certificate config for the connector. */ clientKeyCert?: pulumi.Input<inputs.platform.KubernetesConnectorClientKeyCert>; /** * Selectors to use for the delegate. */ delegateSelectors?: pulumi.Input<pulumi.Input<string>[]>; /** * Description of the resource. */ description?: pulumi.Input<string>; /** * Enable this flag for force deletion of connector */ forceDelete?: pulumi.Input<boolean>; /** * Unique identifier of the resource. */ identifier?: pulumi.Input<string>; /** * Credentials are inherited from the delegate. */ inheritFromDelegate?: pulumi.Input<inputs.platform.KubernetesConnectorInheritFromDelegate>; /** * Name of the resource. */ name?: pulumi.Input<string>; /** * OpenID configuration for the connector. */ openidConnect?: pulumi.Input<inputs.platform.KubernetesConnectorOpenidConnect>; /** * Unique identifier of the organization. */ orgId?: pulumi.Input<string>; /** * Unique identifier of the project. */ projectId?: pulumi.Input<string>; /** * Service account for the connector. */ serviceAccount?: pulumi.Input<inputs.platform.KubernetesConnectorServiceAccount>; /** * Tags to associate with the resource. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Username and password for the connector. */ usernamePassword?: pulumi.Input<inputs.platform.KubernetesConnectorUsernamePassword>; } /** * The set of arguments for constructing a KubernetesConnector resource. */ export interface KubernetesConnectorArgs { /** * Client key and certificate config for the connector. */ clientKeyCert?: pulumi.Input<inputs.platform.KubernetesConnectorClientKeyCert>; /** * Selectors to use for the delegate. */ delegateSelectors?: pulumi.Input<pulumi.Input<string>[]>; /** * Description of the resource. */ description?: pulumi.Input<string>; /** * Enable this flag for force deletion of connector */ forceDelete?: pulumi.Input<boolean>; /** * Unique identifier of the resource. */ identifier: pulumi.Input<string>; /** * Credentials are inherited from the delegate. */ inheritFromDelegate?: pulumi.Input<inputs.platform.KubernetesConnectorInheritFromDelegate>; /** * Name of the resource. */ name?: pulumi.Input<string>; /** * OpenID configuration for the connector. */ openidConnect?: pulumi.Input<inputs.platform.KubernetesConnectorOpenidConnect>; /** * Unique identifier of the organization. */ orgId?: pulumi.Input<string>; /** * Unique identifier of the project. */ projectId?: pulumi.Input<string>; /** * Service account for the connector. */ serviceAccount?: pulumi.Input<inputs.platform.KubernetesConnectorServiceAccount>; /** * Tags to associate with the resource. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Username and password for the connector. */ usernamePassword?: pulumi.Input<inputs.platform.KubernetesConnectorUsernamePassword>; }