UNPKG

@lbrlabs/pulumi-harness

Version:

A Pulumi package for creating and managing Harness resources.

123 lines 7.03 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.GitOpsApplications = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating a Harness Gitops Application. * * ## Import * * Import a Project level Gitops Application * * ```sh * $ pulumi import harness:platform/gitOpsApplications:GitOpsApplications example <organization_id>/<project_id>/<agent_id>/<app_name> * ``` */ class GitOpsApplications extends pulumi.CustomResource { /** * Get an existing GitOpsApplications 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, id, state, opts) { return new GitOpsApplications(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GitOpsApplications. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === GitOpsApplications.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state ? state.accountId : undefined; resourceInputs["agentId"] = state ? state.agentId : undefined; resourceInputs["applications"] = state ? state.applications : undefined; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["identifier"] = state ? state.identifier : undefined; resourceInputs["kind"] = state ? state.kind : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["optionsRemoveExistingFinalizers"] = state ? state.optionsRemoveExistingFinalizers : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["queryProject"] = state ? state.queryProject : undefined; resourceInputs["queryRefresh"] = state ? state.queryRefresh : undefined; resourceInputs["queryRepo"] = state ? state.queryRepo : undefined; resourceInputs["queryResourceVersion"] = state ? state.queryResourceVersion : undefined; resourceInputs["querySelector"] = state ? state.querySelector : undefined; resourceInputs["repoId"] = state ? state.repoId : undefined; resourceInputs["requestCascade"] = state ? state.requestCascade : undefined; resourceInputs["requestName"] = state ? state.requestName : undefined; resourceInputs["requestPropagationPolicy"] = state ? state.requestPropagationPolicy : undefined; resourceInputs["upsert"] = state ? state.upsert : undefined; resourceInputs["validate"] = state ? state.validate : undefined; } else { const args = argsOrState; if ((!args || args.accountId === undefined) && !opts.urn) { throw new Error("Missing required property 'accountId'"); } if ((!args || args.agentId === undefined) && !opts.urn) { throw new Error("Missing required property 'agentId'"); } if ((!args || args.applications === undefined) && !opts.urn) { throw new Error("Missing required property 'applications'"); } if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.repoId === undefined) && !opts.urn) { throw new Error("Missing required property 'repoId'"); } resourceInputs["accountId"] = args ? args.accountId : undefined; resourceInputs["agentId"] = args ? args.agentId : undefined; resourceInputs["applications"] = args ? args.applications : undefined; resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["identifier"] = args ? args.identifier : undefined; resourceInputs["kind"] = args ? args.kind : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["optionsRemoveExistingFinalizers"] = args ? args.optionsRemoveExistingFinalizers : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["queryProject"] = args ? args.queryProject : undefined; resourceInputs["queryRefresh"] = args ? args.queryRefresh : undefined; resourceInputs["queryRepo"] = args ? args.queryRepo : undefined; resourceInputs["queryResourceVersion"] = args ? args.queryResourceVersion : undefined; resourceInputs["querySelector"] = args ? args.querySelector : undefined; resourceInputs["repoId"] = args ? args.repoId : undefined; resourceInputs["requestCascade"] = args ? args.requestCascade : undefined; resourceInputs["requestName"] = args ? args.requestName : undefined; resourceInputs["requestPropagationPolicy"] = args ? args.requestPropagationPolicy : undefined; resourceInputs["upsert"] = args ? args.upsert : undefined; resourceInputs["validate"] = args ? args.validate : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GitOpsApplications.__pulumiType, name, resourceInputs, opts); } } exports.GitOpsApplications = GitOpsApplications; /** @internal */ GitOpsApplications.__pulumiType = 'harness:platform/gitOpsApplications:GitOpsApplications'; //# sourceMappingURL=gitOpsApplications.js.map