@pulumi/harness
Version:
A Pulumi package for creating and managing Harness resources.
116 lines • 4.15 kB
JavaScript
"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.getEnvironmentClustersMappingOutput = exports.getEnvironmentClustersMapping = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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",
* },
* ],
* });
* ```
*/
function getEnvironmentClustersMapping(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("harness:platform/getEnvironmentClustersMapping:getEnvironmentClustersMapping", {
"clusters": args.clusters,
"envId": args.envId,
"identifier": args.identifier,
"orgId": args.orgId,
"projectId": args.projectId,
}, opts);
}
exports.getEnvironmentClustersMapping = getEnvironmentClustersMapping;
/**
* 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",
* },
* ],
* });
* ```
*/
function getEnvironmentClustersMappingOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("harness:platform/getEnvironmentClustersMapping:getEnvironmentClustersMapping", {
"clusters": args.clusters,
"envId": args.envId,
"identifier": args.identifier,
"orgId": args.orgId,
"projectId": args.projectId,
}, opts);
}
exports.getEnvironmentClustersMappingOutput = getEnvironmentClustersMappingOutput;
//# sourceMappingURL=getEnvironmentClustersMapping.js.map