UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

97 lines 4.34 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.AwsIntegrationAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.AwsIntegrationAttachment` represents the attachment between a reusable AWS integration and a single stack or module. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@spacelift-io/pulumi-spacelift"; * * // For a stack * const thisAwsIntegrationAttachment = new spacelift.AwsIntegrationAttachment("thisAwsIntegrationAttachment", { * integrationId: spacelift_aws_integration["this"].id, * stackId: "my-stack-id", * read: true, * write: true, * }, { * dependsOn: [aws_iam_role["this"]], * }); * // For a module * const thisIndex_awsIntegrationAttachmentAwsIntegrationAttachment = new spacelift.AwsIntegrationAttachment("thisIndex/awsIntegrationAttachmentAwsIntegrationAttachment", { * integrationId: spacelift_aws_integration["this"].id, * moduleId: "my-module-id", * read: true, * write: true, * }, { * dependsOn: [aws_iam_role["this"]], * }); * ``` * * ## Import * * ```sh * $ pulumi import spacelift:index/awsIntegrationAttachment:AwsIntegrationAttachment read_write_my_stack $INTEGRATION_ID/$PROJECT_ID * ``` */ class AwsIntegrationAttachment extends pulumi.CustomResource { /** * Get an existing AwsIntegrationAttachment 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 AwsIntegrationAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AwsIntegrationAttachment. 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'] === AwsIntegrationAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["attachmentId"] = state ? state.attachmentId : undefined; resourceInputs["integrationId"] = state ? state.integrationId : undefined; resourceInputs["moduleId"] = state ? state.moduleId : undefined; resourceInputs["read"] = state ? state.read : undefined; resourceInputs["stackId"] = state ? state.stackId : undefined; resourceInputs["write"] = state ? state.write : undefined; } else { const args = argsOrState; if ((!args || args.integrationId === undefined) && !opts.urn) { throw new Error("Missing required property 'integrationId'"); } resourceInputs["integrationId"] = args ? args.integrationId : undefined; resourceInputs["moduleId"] = args ? args.moduleId : undefined; resourceInputs["read"] = args ? args.read : undefined; resourceInputs["stackId"] = args ? args.stackId : undefined; resourceInputs["write"] = args ? args.write : undefined; resourceInputs["attachmentId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AwsIntegrationAttachment.__pulumiType, name, resourceInputs, opts); } } exports.AwsIntegrationAttachment = AwsIntegrationAttachment; /** @internal */ AwsIntegrationAttachment.__pulumiType = 'spacelift:index/awsIntegrationAttachment:AwsIntegrationAttachment'; //# sourceMappingURL=awsIntegrationAttachment.js.map