UNPKG

@lbrlabs/pulumi-harness

Version:

A Pulumi package for creating and managing Harness resources.

191 lines (190 loc) 6.12 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for creating a Harness Gitops Cluster. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@lbrlabs/pulumi-harness"; * * // Clusters without Optional tags * const exampleGitOpsCluster = new harness.platform.GitOpsCluster("exampleGitOpsCluster", { * identifier: "identifier", * accountId: "account_id", * projectId: "project_id", * orgId: "org_id", * agentId: "agent_id", * requests: [{ * upsert: false, * clusters: [{ * server: "https://kubernetes.default.svc", * name: "name", * configs: [{ * tlsClientConfigs: [{ * insecure: true, * }], * clusterConnectionType: "IN_CLUSTER", * }], * }], * }], * }); * // Clusters with Optional tags * const examplePlatform_gitOpsClusterGitOpsCluster = new harness.platform.GitOpsCluster("examplePlatform/gitOpsClusterGitOpsCluster", { * identifier: "identifier", * accountId: "account_id", * projectId: "project_id", * orgId: "org_id", * agentId: "agent_id", * requests: [{ * upsert: false, * tags: ["foo:bar"], * clusters: [{ * server: "https://kubernetes.default.svc", * name: "name", * configs: [{ * tlsClientConfigs: [{ * insecure: true, * }], * clusterConnectionType: "IN_CLUSTER", * }], * }], * }], * }); * ``` * * ## Import * * Import a Account level Gitops Cluster * * ```sh * $ pulumi import harness:platform/gitOpsCluster:GitOpsCluster example <agent_id>/<cluster_id> * ``` * * Import a Project level Gitops Cluster * * ```sh * $ pulumi import harness:platform/gitOpsCluster:GitOpsCluster example <organization_id>/<project_id>/<agent_id>/<cluster_id> * ``` */ export declare class GitOpsCluster extends pulumi.CustomResource { /** * Get an existing GitOpsCluster 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?: GitOpsClusterState, opts?: pulumi.CustomResourceOptions): GitOpsCluster; /** * Returns true if the given object is an instance of GitOpsCluster. 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 GitOpsCluster; /** * Account identifier of the GitOps cluster. */ readonly accountId: pulumi.Output<string>; /** * Agent identifier of the GitOps cluster. */ readonly agentId: pulumi.Output<string>; /** * Identifier of the GitOps cluster. */ readonly identifier: pulumi.Output<string>; /** * Organization identifier of the cluster. */ readonly orgId: pulumi.Output<string | undefined>; /** * Project identifier of the GitOps cluster. */ readonly projectId: pulumi.Output<string | undefined>; /** * Query for the GitOps cluster resources. */ readonly queries: pulumi.Output<outputs.platform.GitOpsClusterQuery[] | undefined>; /** * Cluster create or update request. */ readonly requests: pulumi.Output<outputs.platform.GitOpsClusterRequest[] | undefined>; /** * Create a GitOpsCluster 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: GitOpsClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GitOpsCluster resources. */ export interface GitOpsClusterState { /** * Account identifier of the GitOps cluster. */ accountId?: pulumi.Input<string>; /** * Agent identifier of the GitOps cluster. */ agentId?: pulumi.Input<string>; /** * Identifier of the GitOps cluster. */ identifier?: pulumi.Input<string>; /** * Organization identifier of the cluster. */ orgId?: pulumi.Input<string>; /** * Project identifier of the GitOps cluster. */ projectId?: pulumi.Input<string>; /** * Query for the GitOps cluster resources. */ queries?: pulumi.Input<pulumi.Input<inputs.platform.GitOpsClusterQuery>[]>; /** * Cluster create or update request. */ requests?: pulumi.Input<pulumi.Input<inputs.platform.GitOpsClusterRequest>[]>; } /** * The set of arguments for constructing a GitOpsCluster resource. */ export interface GitOpsClusterArgs { /** * Account identifier of the GitOps cluster. */ accountId: pulumi.Input<string>; /** * Agent identifier of the GitOps cluster. */ agentId: pulumi.Input<string>; /** * Identifier of the GitOps cluster. */ identifier: pulumi.Input<string>; /** * Organization identifier of the cluster. */ orgId?: pulumi.Input<string>; /** * Project identifier of the GitOps cluster. */ projectId?: pulumi.Input<string>; /** * Query for the GitOps cluster resources. */ queries?: pulumi.Input<pulumi.Input<inputs.platform.GitOpsClusterQuery>[]>; /** * Cluster create or update request. */ requests?: pulumi.Input<pulumi.Input<inputs.platform.GitOpsClusterRequest>[]>; }