UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

99 lines 4.53 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.AzureIntegrationAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * `spacelift.AzureIntegrationAttachment` represents the attachment between a reusable Azure 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 readonly = new spacelift.AzureIntegrationAttachment("readonly", { * integrationId: spacelift_azure_integration.example.id, * stackId: spacelift_stack.example.id, * write: false, * subscriptionId: "subscription_id", * }); * // For a module * const writeonly = new spacelift.AzureIntegrationAttachment("writeonly", { * integrationId: spacelift_azure_integration.example.id, * stackId: spacelift_module.example.id, * read: false, * subscriptionId: "subscription_id", * }); * ``` * * ## Import * * ```sh * $ pulumi import spacelift:index/azureIntegrationAttachment:AzureIntegrationAttachment readonly $INTEGRATION_ID/$STACK_ID * ``` * * ```sh * $ pulumi import spacelift:index/azureIntegrationAttachment:AzureIntegrationAttachment writeonly $INTEGRATION_ID/$MODULE_ID * ``` */ class AzureIntegrationAttachment extends pulumi.CustomResource { /** * Get an existing AzureIntegrationAttachment 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 AzureIntegrationAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AzureIntegrationAttachment. 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'] === AzureIntegrationAttachment.__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["subscriptionId"] = state ? state.subscriptionId : 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["subscriptionId"] = args ? args.subscriptionId : undefined; resourceInputs["write"] = args ? args.write : undefined; resourceInputs["attachmentId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AzureIntegrationAttachment.__pulumiType, name, resourceInputs, opts); } } exports.AzureIntegrationAttachment = AzureIntegrationAttachment; /** @internal */ AzureIntegrationAttachment.__pulumiType = 'spacelift:index/azureIntegrationAttachment:AzureIntegrationAttachment'; //# sourceMappingURL=azureIntegrationAttachment.js.map