UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

175 lines (174 loc) 5.26 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Data source for retrieving Harness Gitops clusters mapped to Harness Environment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // data source for gitops clusters mapped to a project level env * const example = harness.platform.getEnvironmentClustersMapping({ * identifier: "mycustomidentifier", * orgId: "orgIdentifer", * projectId: "projectIdentifier", * envId: "exampleEnvId", * clusters: [{ * identifier: "incluster", * name: "in-cluster", * agentIdentifier: "account.gitopsagentdev", * scope: "ACCOUNT", * }], * }); * // data source for two gitops clusters mapped to an account level env * const example2 = harness.platform.getEnvironmentClustersMapping({ * identifier: "mycustomidentifier", * envId: "env1", * clusters: [ * { * identifier: "clusterA", * name: "cluster-A", * agentIdentifier: "account.gitopsagentprod", * scope: "ACCOUNT", * }, * { * identifier: "clusterB", * name: "cluster-B", * agentIdentifier: "account.gitopsagentprod", * scope: "ACCOUNT", * }, * ], * }); * ``` */ export declare function getEnvironmentClustersMapping(args: GetEnvironmentClustersMappingArgs, opts?: pulumi.InvokeOptions): Promise<GetEnvironmentClustersMappingResult>; /** * A collection of arguments for invoking getEnvironmentClustersMapping. */ export interface GetEnvironmentClustersMappingArgs { /** * list of cluster identifiers and names */ clusters?: inputs.platform.GetEnvironmentClustersMappingCluster[]; /** * environment identifier. */ envId: string; /** * identifier for the cluster mapping(can be given any value). */ identifier: string; /** * org_id of the environment. */ orgId?: string; /** * project_id of the environment. */ projectId?: string; } /** * A collection of values returned by getEnvironmentClustersMapping. */ export interface GetEnvironmentClustersMappingResult { /** * list of cluster identifiers and names */ readonly clusters?: outputs.platform.GetEnvironmentClustersMappingCluster[]; /** * environment identifier. */ readonly envId: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * identifier for the cluster mapping(can be given any value). */ readonly identifier: string; /** * org_id of the environment. */ readonly orgId?: string; /** * project_id of the environment. */ readonly projectId?: string; /** * scope at which the environment exists in harness. */ readonly scope: string; } /** * Data source for retrieving Harness Gitops clusters mapped to Harness Environment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // data source for gitops clusters mapped to a project level env * const example = harness.platform.getEnvironmentClustersMapping({ * identifier: "mycustomidentifier", * orgId: "orgIdentifer", * projectId: "projectIdentifier", * envId: "exampleEnvId", * clusters: [{ * identifier: "incluster", * name: "in-cluster", * agentIdentifier: "account.gitopsagentdev", * scope: "ACCOUNT", * }], * }); * // data source for two gitops clusters mapped to an account level env * const example2 = harness.platform.getEnvironmentClustersMapping({ * identifier: "mycustomidentifier", * envId: "env1", * clusters: [ * { * identifier: "clusterA", * name: "cluster-A", * agentIdentifier: "account.gitopsagentprod", * scope: "ACCOUNT", * }, * { * identifier: "clusterB", * name: "cluster-B", * agentIdentifier: "account.gitopsagentprod", * scope: "ACCOUNT", * }, * ], * }); * ``` */ export declare function getEnvironmentClustersMappingOutput(args: GetEnvironmentClustersMappingOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetEnvironmentClustersMappingResult>; /** * A collection of arguments for invoking getEnvironmentClustersMapping. */ export interface GetEnvironmentClustersMappingOutputArgs { /** * list of cluster identifiers and names */ clusters?: pulumi.Input<pulumi.Input<inputs.platform.GetEnvironmentClustersMappingClusterArgs>[]>; /** * environment identifier. */ envId: pulumi.Input<string>; /** * identifier for the cluster mapping(can be given any value). */ identifier: pulumi.Input<string>; /** * org_id of the environment. */ orgId?: pulumi.Input<string>; /** * project_id of the environment. */ projectId?: pulumi.Input<string>; }