UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

116 lines 5.41 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationVersion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic Beanstalk Application Version Resource. Elastic Beanstalk allows * you to deploy and manage applications in the AWS cloud without worrying about * the infrastructure that runs those applications. * * This resource creates a Beanstalk Application Version that can be deployed to a Beanstalk * Environment. * * > **NOTE on Application Version Resource:** When using the Application Version resource with multiple * Elastic Beanstalk Environments it is possible that an error may be returned * when attempting to delete an Application Version while it is still in use by a different environment. * To work around this you can either create each environment in a separate AWS account or create your `aws.elasticbeanstalk.ApplicationVersion` resources with a unique names in your Elastic Beanstalk Application. For example <revision>-<environment>. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.s3.Bucket("default", {bucket: "tftest.applicationversion.bucket"}); * const defaultBucketObjectv2 = new aws.s3.BucketObjectv2("default", { * bucket: _default.id, * key: "beanstalk/go-v1.zip", * source: new pulumi.asset.FileAsset("go-v1.zip"), * }); * const defaultApplication = new aws.elasticbeanstalk.Application("default", { * name: "tf-test-name", * description: "tf-test-desc", * }); * const defaultApplicationVersion = new aws.elasticbeanstalk.ApplicationVersion("default", { * name: "tf-test-version-label", * application: "tf-test-name", * description: "application version", * bucket: _default.id, * key: defaultBucketObjectv2.key, * }); * ``` */ class ApplicationVersion extends pulumi.CustomResource { /** * Get an existing ApplicationVersion 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 ApplicationVersion(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ApplicationVersion. 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'] === ApplicationVersion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["application"] = state?.application; resourceInputs["arn"] = state?.arn; resourceInputs["bucket"] = state?.bucket; resourceInputs["description"] = state?.description; resourceInputs["forceDelete"] = state?.forceDelete; resourceInputs["key"] = state?.key; resourceInputs["name"] = state?.name; resourceInputs["process"] = state?.process; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.application === undefined && !opts.urn) { throw new Error("Missing required property 'application'"); } if (args?.bucket === undefined && !opts.urn) { throw new Error("Missing required property 'bucket'"); } if (args?.key === undefined && !opts.urn) { throw new Error("Missing required property 'key'"); } resourceInputs["application"] = args?.application; resourceInputs["bucket"] = args?.bucket; resourceInputs["description"] = args?.description; resourceInputs["forceDelete"] = args?.forceDelete; resourceInputs["key"] = args?.key; resourceInputs["name"] = args?.name; resourceInputs["process"] = args?.process; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ApplicationVersion.__pulumiType, name, resourceInputs, opts); } } exports.ApplicationVersion = ApplicationVersion; /** @internal */ ApplicationVersion.__pulumiType = 'aws:elasticbeanstalk/applicationVersion:ApplicationVersion'; //# sourceMappingURL=applicationVersion.js.map