UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

75 lines 4.09 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.AwsIntegration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.AwsIntegration` represents an integration with an AWS account. This integration is account-level and needs to be explicitly attached to individual stacks in order to take effect. * * Note: when assuming credentials for **shared workers**, Spacelift will use `$accountName@$integrationID@$stackID@$suffix` or `$accountName@$integrationID@$moduleID@$suffix` as [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) and `$runID@$stackID@$accountName` truncated to 64 characters as [session ID](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole),$suffix will be `read` or `write`. * * ## Import * * ```sh * $ pulumi import spacelift:index/awsIntegration:AwsIntegration read_write_integration $INTEGRATION_ID * ``` */ class AwsIntegration extends pulumi.CustomResource { /** * Get an existing AwsIntegration 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 AwsIntegration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AwsIntegration. 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'] === AwsIntegration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["durationSeconds"] = state ? state.durationSeconds : undefined; resourceInputs["externalId"] = state ? state.externalId : undefined; resourceInputs["generateCredentialsInWorker"] = state ? state.generateCredentialsInWorker : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["roleArn"] = state ? state.roleArn : undefined; resourceInputs["spaceId"] = state ? state.spaceId : undefined; } else { const args = argsOrState; if ((!args || args.roleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["durationSeconds"] = args ? args.durationSeconds : undefined; resourceInputs["externalId"] = args ? args.externalId : undefined; resourceInputs["generateCredentialsInWorker"] = args ? args.generateCredentialsInWorker : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["spaceId"] = args ? args.spaceId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AwsIntegration.__pulumiType, name, resourceInputs, opts); } } exports.AwsIntegration = AwsIntegration; /** @internal */ AwsIntegration.__pulumiType = 'spacelift:index/awsIntegration:AwsIntegration'; //# sourceMappingURL=awsIntegration.js.map