UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

124 lines 6.49 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.Module = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@spacelift-io/pulumi-spacelift"; * * // Explicit module name and provider: * const k8s_module = new spacelift.Module("k8s-module", { * administrative: true, * branch: "master", * description: "Infra terraform module", * repository: "terraform-super-module", * terraformProvider: "aws", * }); * // Unspecified module name and provider (repository naming scheme terraform-${provider}-${name}) * const example_module = new spacelift.Module("example-module", { * administrative: true, * branch: "master", * description: "Example terraform module", * projectRoot: "example", * repository: "terraform-aws-example", * }); * ``` * * ## Import * * ```sh * $ pulumi import spacelift:index/module:Module k8s-module $MODULE_ID * ``` */ class Module extends pulumi.CustomResource { /** * Get an existing Module 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 Module(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Module. 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'] === Module.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["administrative"] = state ? state.administrative : undefined; resourceInputs["awsAssumeRolePolicyStatement"] = state ? state.awsAssumeRolePolicyStatement : undefined; resourceInputs["azureDevops"] = state ? state.azureDevops : undefined; resourceInputs["bitbucketCloud"] = state ? state.bitbucketCloud : undefined; resourceInputs["bitbucketDatacenter"] = state ? state.bitbucketDatacenter : undefined; resourceInputs["branch"] = state ? state.branch : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enableLocalPreview"] = state ? state.enableLocalPreview : undefined; resourceInputs["githubEnterprise"] = state ? state.githubEnterprise : undefined; resourceInputs["gitlab"] = state ? state.gitlab : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectRoot"] = state ? state.projectRoot : undefined; resourceInputs["protectFromDeletion"] = state ? state.protectFromDeletion : undefined; resourceInputs["repository"] = state ? state.repository : undefined; resourceInputs["sharedAccounts"] = state ? state.sharedAccounts : undefined; resourceInputs["spaceId"] = state ? state.spaceId : undefined; resourceInputs["terraformProvider"] = state ? state.terraformProvider : undefined; resourceInputs["workerPoolId"] = state ? state.workerPoolId : undefined; resourceInputs["workflowTool"] = state ? state.workflowTool : undefined; } else { const args = argsOrState; if ((!args || args.branch === undefined) && !opts.urn) { throw new Error("Missing required property 'branch'"); } if ((!args || args.repository === undefined) && !opts.urn) { throw new Error("Missing required property 'repository'"); } resourceInputs["administrative"] = args ? args.administrative : undefined; resourceInputs["azureDevops"] = args ? args.azureDevops : undefined; resourceInputs["bitbucketCloud"] = args ? args.bitbucketCloud : undefined; resourceInputs["bitbucketDatacenter"] = args ? args.bitbucketDatacenter : undefined; resourceInputs["branch"] = args ? args.branch : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enableLocalPreview"] = args ? args.enableLocalPreview : undefined; resourceInputs["githubEnterprise"] = args ? args.githubEnterprise : undefined; resourceInputs["gitlab"] = args ? args.gitlab : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectRoot"] = args ? args.projectRoot : undefined; resourceInputs["protectFromDeletion"] = args ? args.protectFromDeletion : undefined; resourceInputs["repository"] = args ? args.repository : undefined; resourceInputs["sharedAccounts"] = args ? args.sharedAccounts : undefined; resourceInputs["spaceId"] = args ? args.spaceId : undefined; resourceInputs["terraformProvider"] = args ? args.terraformProvider : undefined; resourceInputs["workerPoolId"] = args ? args.workerPoolId : undefined; resourceInputs["workflowTool"] = args ? args.workflowTool : undefined; resourceInputs["awsAssumeRolePolicyStatement"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Module.__pulumiType, name, resourceInputs, opts); } } exports.Module = Module; /** @internal */ Module.__pulumiType = 'spacelift:index/module:Module'; //# sourceMappingURL=module.js.map