UNPKG

@lbrlabs/pulumi-harness

Version:

A Pulumi package for creating and managing Harness resources.

100 lines 4.65 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.Aws = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating an AWS cloud provider. This resource uses the config-as-code API's. When updating the `name` or `path` of this resource you should typically also set the `createBeforeDestroy = true` lifecycle setting. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@lbrlabs/pulumi-harness"; * import * as harness from "@pulumi/harness"; * * const default = harness.getSecretManager({ * "default": true, * }); * const awsAccessKey = new harness.EncryptedText("awsAccessKey", { * value: "<ACCESS_KEY_ID>", * secretManagerId: _default.then(_default => _default.id), * }); * const awsSecretKey = new harness.EncryptedText("awsSecretKey", { * value: "<SECRET_KEY_ID>", * secretManagerId: _default.then(_default => _default.id), * }); * const aws = new harness.cloudprovider.Aws("aws", { * accessKeyIdSecretName: awsAccessKey.name, * secretAccessKeySecretName: awsSecretKey.name, * }); * ``` * * ## Import * * Import using the Harness aws cloud provider id. * * ```sh * $ pulumi import harness:cloudprovider/aws:Aws example <provider_id> * ``` */ class Aws extends pulumi.CustomResource { /** * Get an existing Aws 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 Aws(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Aws. 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'] === Aws.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessKeyId"] = state ? state.accessKeyId : undefined; resourceInputs["accessKeyIdSecretName"] = state ? state.accessKeyIdSecretName : undefined; resourceInputs["assumeCrossAccountRole"] = state ? state.assumeCrossAccountRole : undefined; resourceInputs["delegateSelector"] = state ? state.delegateSelector : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["secretAccessKeySecretName"] = state ? state.secretAccessKeySecretName : undefined; resourceInputs["usageScopes"] = state ? state.usageScopes : undefined; resourceInputs["useEc2IamCredentials"] = state ? state.useEc2IamCredentials : undefined; resourceInputs["useIrsa"] = state ? state.useIrsa : undefined; } else { const args = argsOrState; resourceInputs["accessKeyId"] = args ? args.accessKeyId : undefined; resourceInputs["accessKeyIdSecretName"] = args ? args.accessKeyIdSecretName : undefined; resourceInputs["assumeCrossAccountRole"] = args ? args.assumeCrossAccountRole : undefined; resourceInputs["delegateSelector"] = args ? args.delegateSelector : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["secretAccessKeySecretName"] = args ? args.secretAccessKeySecretName : undefined; resourceInputs["usageScopes"] = args ? args.usageScopes : undefined; resourceInputs["useEc2IamCredentials"] = args ? args.useEc2IamCredentials : undefined; resourceInputs["useIrsa"] = args ? args.useIrsa : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Aws.__pulumiType, name, resourceInputs, opts); } } exports.Aws = Aws; /** @internal */ Aws.__pulumiType = 'harness:cloudprovider/aws:Aws'; //# sourceMappingURL=aws.js.map