ApplicationVersion

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultBucket = new Aws.S3.Bucket("defaultBucket", new Aws.S3.BucketArgs
        {
        });
        var defaultBucketObject = new Aws.S3.BucketObject("defaultBucketObject", new Aws.S3.BucketObjectArgs
        {
            Bucket = defaultBucket.Id,
            Key = "beanstalk/go-v1.zip",
            Source = new FileAsset("go-v1.zip"),
        });
        var defaultApplication = new Aws.ElasticBeanstalk.Application("defaultApplication", new Aws.ElasticBeanstalk.ApplicationArgs
        {
            Description = "tf-test-desc",
        });
        var defaultApplicationVersion = new Aws.ElasticBeanstalk.ApplicationVersion("defaultApplicationVersion", new Aws.ElasticBeanstalk.ApplicationVersionArgs
        {
            Application = "tf-test-name",
            Bucket = defaultBucket.Id,
            Description = "application version",
            Key = defaultBucketObject.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/elasticbeanstalk"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/s3"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        defaultBucket, err := s3.NewBucket(ctx, "defaultBucket", nil)
        if err != nil {
            return err
        }
        defaultBucketObject, err := s3.NewBucketObject(ctx, "defaultBucketObject", &s3.BucketObjectArgs{
            Bucket: defaultBucket.ID(),
            Key:    pulumi.String("beanstalk/go-v1.zip"),
            Source: pulumi.NewFileAsset("go-v1.zip"),
        })
        if err != nil {
            return err
        }
        _, err = elasticbeanstalk.NewApplication(ctx, "defaultApplication", &elasticbeanstalk.ApplicationArgs{
            Description: pulumi.String("tf-test-desc"),
        })
        if err != nil {
            return err
        }
        _, err = elasticbeanstalk.NewApplicationVersion(ctx, "defaultApplicationVersion", &elasticbeanstalk.ApplicationVersionArgs{
            Application: pulumi.String("tf-test-name"),
            Bucket:      defaultBucket.ID(),
            Description: pulumi.String("application version"),
            Key:         defaultBucketObject.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

default_bucket = aws.s3.Bucket("defaultBucket")
default_bucket_object = aws.s3.BucketObject("defaultBucketObject",
    bucket=default_bucket.id,
    key="beanstalk/go-v1.zip",
    source=pulumi.FileAsset("go-v1.zip"))
default_application = aws.elasticbeanstalk.Application("defaultApplication", description="tf-test-desc")
default_application_version = aws.elasticbeanstalk.ApplicationVersion("defaultApplicationVersion",
    application="tf-test-name",
    bucket=default_bucket.id,
    description="application version",
    key=default_bucket_object.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultBucket = new aws.s3.Bucket("default", {});
const defaultBucketObject = new aws.s3.BucketObject("default", {
    bucket: defaultBucket.id,
    key: "beanstalk/go-v1.zip",
    source: new pulumi.asset.FileAsset("go-v1.zip"),
});
const defaultApplication = new aws.elasticbeanstalk.Application("default", {
    description: "tf-test-desc",
});
const defaultApplicationVersion = new aws.elasticbeanstalk.ApplicationVersion("default", {
    application: "tf-test-name",
    bucket: defaultBucket.id,
    description: "application version",
    key: defaultBucketObject.id,
});

Create a ApplicationVersion Resource

def ApplicationVersion(resource_name, opts=None, application=None, bucket=None, description=None, force_delete=None, key=None, name=None, tags=None, __props__=None);
name string
The unique name of the resource.
args ApplicationVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ApplicationVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ApplicationVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ApplicationVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ApplicationVersion resource accepts the following input properties:

Application string

Name of the Beanstalk Application the version is associated with.

Bucket string

S3 bucket that contains the Application Version source bundle.

Key string

S3 object that is the Application Version source bundle.

Description string

Short description of the Application Version.

ForceDelete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

Name string

A unique name for the this Application Version.

Tags Dictionary<string, string>

Key-value map of tags for the Elastic Beanstalk Application Version.

Application interface{}

Name of the Beanstalk Application the version is associated with.

Bucket interface{}

S3 bucket that contains the Application Version source bundle.

Key string

S3 object that is the Application Version source bundle.

Description string

Short description of the Application Version.

ForceDelete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

Name string

A unique name for the this Application Version.

Tags map[string]string

Key-value map of tags for the Elastic Beanstalk Application Version.

application string | Application

Name of the Beanstalk Application the version is associated with.

bucket string | Bucket

S3 bucket that contains the Application Version source bundle.

key string

S3 object that is the Application Version source bundle.

description string

Short description of the Application Version.

forceDelete boolean

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

name string

A unique name for the this Application Version.

tags {[key: string]: string}

Key-value map of tags for the Elastic Beanstalk Application Version.

application string | str

Name of the Beanstalk Application the version is associated with.

bucket string | str

S3 bucket that contains the Application Version source bundle.

key str

S3 object that is the Application Version source bundle.

description str

Short description of the Application Version.

force_delete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

name str

A unique name for the this Application Version.

tags Dict[str, str]

Key-value map of tags for the Elastic Beanstalk Application Version.

Outputs

All input properties are implicitly available as output properties. Additionally, the ApplicationVersion resource produces the following output properties:

Arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

id string
The provider-assigned unique ID for this managed resource.
arn str

The ARN assigned by AWS for this Elastic Beanstalk Application.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ApplicationVersion Resource

Get an existing ApplicationVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ApplicationVersionState, opts?: CustomResourceOptions): ApplicationVersion
static get(resource_name, id, opts=None, application=None, arn=None, bucket=None, description=None, force_delete=None, key=None, name=None, tags=None, __props__=None);
func GetApplicationVersion(ctx *Context, name string, id IDInput, state *ApplicationVersionState, opts ...ResourceOption) (*ApplicationVersion, error)
public static ApplicationVersion Get(string name, Input<string> id, ApplicationVersionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Application string

Name of the Beanstalk Application the version is associated with.

Arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

Bucket string

S3 bucket that contains the Application Version source bundle.

Description string

Short description of the Application Version.

ForceDelete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

Key string

S3 object that is the Application Version source bundle.

Name string

A unique name for the this Application Version.

Tags Dictionary<string, string>

Key-value map of tags for the Elastic Beanstalk Application Version.

Application interface{}

Name of the Beanstalk Application the version is associated with.

Arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

Bucket interface{}

S3 bucket that contains the Application Version source bundle.

Description string

Short description of the Application Version.

ForceDelete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

Key string

S3 object that is the Application Version source bundle.

Name string

A unique name for the this Application Version.

Tags map[string]string

Key-value map of tags for the Elastic Beanstalk Application Version.

application string | Application

Name of the Beanstalk Application the version is associated with.

arn string

The ARN assigned by AWS for this Elastic Beanstalk Application.

bucket string | Bucket

S3 bucket that contains the Application Version source bundle.

description string

Short description of the Application Version.

forceDelete boolean

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

key string

S3 object that is the Application Version source bundle.

name string

A unique name for the this Application Version.

tags {[key: string]: string}

Key-value map of tags for the Elastic Beanstalk Application Version.

application string | str

Name of the Beanstalk Application the version is associated with.

arn str

The ARN assigned by AWS for this Elastic Beanstalk Application.

bucket string | str

S3 bucket that contains the Application Version source bundle.

description str

Short description of the Application Version.

force_delete bool

On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.

key str

S3 object that is the Application Version source bundle.

name str

A unique name for the this Application Version.

tags Dict[str, str]

Key-value map of tags for the Elastic Beanstalk Application Version.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.