UNPKG

@lbrlabs/pulumi-harness

Version:

A Pulumi package for creating and managing Harness resources.

103 lines 4.21 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.GitOpsGnupg = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * GPG public key in the server's configuration. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@lbrlabs/pulumi-harness"; * * const example = new harness.platform.GitOpsGnupg("example", { * accountId: "account_id", * agentId: "agent_id", * requests: [{ * upsert: true, * publickeys: [{ * keyData: "-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----", * }], * }], * }); * ``` * * ## Import * * Import a Account level Gitops Cluster * * ```sh * $ pulumi import harness:platform/gitOpsGnupg:GitOpsGnupg example <agent_id>/<key_id> * ``` * * Import a Project level Gitops Cluster * * ```sh * $ pulumi import harness:platform/gitOpsGnupg:GitOpsGnupg example <organization_id>/<project_id>/<agent_id>/<key_id> * ``` */ class GitOpsGnupg extends pulumi.CustomResource { /** * Get an existing GitOpsGnupg 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 GitOpsGnupg(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GitOpsGnupg. 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'] === GitOpsGnupg.__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["identifier"] = state ? state.identifier : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["requests"] = state ? state.requests : 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.requests === undefined) && !opts.urn) { throw new Error("Missing required property 'requests'"); } resourceInputs["accountId"] = args ? args.accountId : undefined; resourceInputs["agentId"] = args ? args.agentId : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["requests"] = args ? args.requests : undefined; resourceInputs["identifier"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GitOpsGnupg.__pulumiType, name, resourceInputs, opts); } } exports.GitOpsGnupg = GitOpsGnupg; /** @internal */ GitOpsGnupg.__pulumiType = 'harness:platform/gitOpsGnupg:GitOpsGnupg'; //# sourceMappingURL=gitOpsGnupg.js.map