AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

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 defaultBucketV2 = new Aws.S3.BucketV2("defaultBucketV2", new Aws.S3.BucketV2Args
        {
        });
        var defaultBucketObjectv2 = new Aws.S3.BucketObjectv2("defaultBucketObjectv2", new Aws.S3.BucketObjectv2Args
        {
            Bucket = defaultBucketV2.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",
            Description = "application version",
            Bucket = defaultBucketV2.Id,
            Key = defaultBucketObjectv2.Id,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultBucketV2, err := s3.NewBucketV2(ctx, "defaultBucketV2", nil)
		if err != nil {
			return err
		}
		defaultBucketObjectv2, err := s3.NewBucketObjectv2(ctx, "defaultBucketObjectv2", &s3.BucketObjectv2Args{
			Bucket: defaultBucketV2.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.Any("tf-test-name"),
			Description: pulumi.String("application version"),
			Bucket:      defaultBucketV2.ID(),
			Key:         defaultBucketObjectv2.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var defaultBucketV2 = new BucketV2("defaultBucketV2");

        var defaultBucketObjectv2 = new BucketObjectv2("defaultBucketObjectv2", BucketObjectv2Args.builder()        
            .bucket(defaultBucketV2.id())
            .key("beanstalk/go-v1.zip")
            .source(new FileAsset("go-v1.zip"))
            .build());

        var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()        
            .description("tf-test-desc")
            .build());

        var defaultApplicationVersion = new ApplicationVersion("defaultApplicationVersion", ApplicationVersionArgs.builder()        
            .application("tf-test-name")
            .description("application version")
            .bucket(defaultBucketV2.id())
            .key(defaultBucketObjectv2.id())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

default_bucket_v2 = aws.s3.BucketV2("defaultBucketV2")
default_bucket_objectv2 = aws.s3.BucketObjectv2("defaultBucketObjectv2",
    bucket=default_bucket_v2.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",
    description="application version",
    bucket=default_bucket_v2.id,
    key=default_bucket_objectv2.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultBucketV2 = new aws.s3.BucketV2("defaultBucketV2", {});
const defaultBucketObjectv2 = new aws.s3.BucketObjectv2("defaultBucketObjectv2", {
    bucket: defaultBucketV2.id,
    key: "beanstalk/go-v1.zip",
    source: new pulumi.asset.FileAsset("go-v1.zip"),
});
const defaultApplication = new aws.elasticbeanstalk.Application("defaultApplication", {description: "tf-test-desc"});
const defaultApplicationVersion = new aws.elasticbeanstalk.ApplicationVersion("defaultApplicationVersion", {
    application: "tf-test-name",
    description: "application version",
    bucket: defaultBucketV2.id,
    key: defaultBucketObjectv2.id,
});
resources:
  defaultBucketV2:
    type: aws:s3:BucketV2
  defaultBucketObjectv2:
    type: aws:s3:BucketObjectv2
    properties:
      bucket: ${defaultBucketV2.id}
      key: beanstalk/go-v1.zip
      source:
        Fn::FileAsset: go-v1.zip
  defaultApplication:
    type: aws:elasticbeanstalk:Application
    properties:
      description: tf-test-desc
  defaultApplicationVersion:
    type: aws:elasticbeanstalk:ApplicationVersion
    properties:
      application: tf-test-name
      description: application version
      bucket: ${defaultBucketV2.id}
      key: ${defaultBucketObjectv2.id}

Create a ApplicationVersion Resource

new ApplicationVersion(name: string, args: ApplicationVersionArgs, opts?: CustomResourceOptions);
@overload
def ApplicationVersion(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       application: Optional[str] = None,
                       bucket: Optional[str] = None,
                       description: Optional[str] = None,
                       force_delete: Optional[bool] = None,
                       key: Optional[str] = None,
                       name: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
@overload
def ApplicationVersion(resource_name: str,
                       args: ApplicationVersionArgs,
                       opts: Optional[ResourceOptions] = None)
func NewApplicationVersion(ctx *Context, name string, args ApplicationVersionArgs, opts ...ResourceOption) (*ApplicationVersion, error)
public ApplicationVersion(string name, ApplicationVersionArgs args, CustomResourceOptions? opts = null)
public ApplicationVersion(String name, ApplicationVersionArgs args)
public ApplicationVersion(String name, ApplicationVersionArgs args, CustomResourceOptions options)
type: aws:elasticbeanstalk:ApplicationVersion
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args ApplicationVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args ApplicationVersionArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The ApplicationVersion resource accepts the following input properties:

Application string | string

Name of the Beanstalk Application the version is associated with.

Bucket string | 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

Unique name for the this Application Version.

Tags Dictionary<string, string>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Application string | string

Name of the Beanstalk Application the version is associated with.

Bucket string | 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

Unique name for the this Application Version.

Tags map[string]string

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

application String | String

Name of the Beanstalk Application the version is associated with.

bucket String | 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 Boolean

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

name String

Unique name for the this Application Version.

tags Map<String,String>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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

Unique name for the this Application Version.

tags {[key: string]: string}

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

application str | str

Name of the Beanstalk Application the version is associated with.

bucket str | 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

Unique name for the this Application Version.

tags Mapping[str, str]

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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 Boolean

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

name String

Unique name for the this Application Version.

tags Map<String>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string

ARN assigned by AWS for this Elastic Beanstalk Application.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>
Arn string

ARN assigned by AWS for this Elastic Beanstalk Application.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string
arn String

ARN assigned by AWS for this Elastic Beanstalk Application.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>
arn string

ARN assigned by AWS for this Elastic Beanstalk Application.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}
arn str

ARN assigned by AWS for this Elastic Beanstalk Application.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]
arn String

ARN assigned by AWS for this Elastic Beanstalk Application.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application: Optional[str] = None,
        arn: Optional[str] = None,
        bucket: Optional[str] = None,
        description: Optional[str] = None,
        force_delete: Optional[bool] = None,
        key: Optional[str] = None,
        name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> ApplicationVersion
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)
public static ApplicationVersion get(String name, Output<String> id, ApplicationVersionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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 | string

Name of the Beanstalk Application the version is associated with.

Arn string

ARN assigned by AWS for this Elastic Beanstalk Application.

Bucket string | 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

Unique name for the this Application Version.

Tags Dictionary<string, string>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>
Application string | string

Name of the Beanstalk Application the version is associated with.

Arn string

ARN assigned by AWS for this Elastic Beanstalk Application.

Bucket string | 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

Unique name for the this Application Version.

Tags map[string]string

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string
application String | String

Name of the Beanstalk Application the version is associated with.

arn String

ARN assigned by AWS for this Elastic Beanstalk Application.

bucket String | String

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

Unique name for the this Application Version.

tags Map<String,String>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>
application string | Application

Name of the Beanstalk Application the version is associated with.

arn string

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

Unique name for the this Application Version.

tags {[key: string]: string}

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}
application str | str

Name of the Beanstalk Application the version is associated with.

arn str

ARN assigned by AWS for this Elastic Beanstalk Application.

bucket str | 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

Unique name for the this Application Version.

tags Mapping[str, str]

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]
application String |

Name of the Beanstalk Application the version is associated with.

arn String

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 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

Unique name for the this Application Version.

tags Map<String>

Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.