1. Packages
  2. AWS Classic
  3. API Docs
  4. elasticbeanstalk
  5. ApplicationVersion

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.elasticbeanstalk.ApplicationVersion

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _default = new aws.s3.BucketV2("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.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    default = aws.s3.BucketV2("default", bucket="tftest.applicationversion.bucket")
    default_bucket_objectv2 = aws.s3.BucketObjectv2("default",
        bucket=default.id,
        key="beanstalk/go-v1.zip",
        source=pulumi.FileAsset("go-v1.zip"))
    default_application = aws.elasticbeanstalk.Application("default",
        name="tf-test-name",
        description="tf-test-desc")
    default_application_version = aws.elasticbeanstalk.ApplicationVersion("default",
        name="tf-test-version-label",
        application="tf-test-name",
        description="application version",
        bucket=default.id,
        key=default_bucket_objectv2.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := s3.NewBucketV2(ctx, "default", &s3.BucketV2Args{
    			Bucket: pulumi.String("tftest.applicationversion.bucket"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultBucketObjectv2, err := s3.NewBucketObjectv2(ctx, "default", &s3.BucketObjectv2Args{
    			Bucket: _default.ID(),
    			Key:    pulumi.String("beanstalk/go-v1.zip"),
    			Source: pulumi.NewFileAsset("go-v1.zip"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elasticbeanstalk.NewApplication(ctx, "default", &elasticbeanstalk.ApplicationArgs{
    			Name:        pulumi.String("tf-test-name"),
    			Description: pulumi.String("tf-test-desc"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elasticbeanstalk.NewApplicationVersion(ctx, "default", &elasticbeanstalk.ApplicationVersionArgs{
    			Name:        pulumi.String("tf-test-version-label"),
    			Application: pulumi.Any("tf-test-name"),
    			Description: pulumi.String("application version"),
    			Bucket:      _default.ID(),
    			Key:         defaultBucketObjectv2.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Aws.S3.BucketV2("default", new()
        {
            Bucket = "tftest.applicationversion.bucket",
        });
    
        var defaultBucketObjectv2 = new Aws.S3.BucketObjectv2("default", new()
        {
            Bucket = @default.Id,
            Key = "beanstalk/go-v1.zip",
            Source = new FileAsset("go-v1.zip"),
        });
    
        var defaultApplication = new Aws.ElasticBeanstalk.Application("default", new()
        {
            Name = "tf-test-name",
            Description = "tf-test-desc",
        });
    
        var defaultApplicationVersion = new Aws.ElasticBeanstalk.ApplicationVersion("default", new()
        {
            Name = "tf-test-version-label",
            Application = "tf-test-name",
            Description = "application version",
            Bucket = @default.Id,
            Key = defaultBucketObjectv2.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3.BucketV2;
    import com.pulumi.aws.s3.BucketV2Args;
    import com.pulumi.aws.s3.BucketObjectv2;
    import com.pulumi.aws.s3.BucketObjectv2Args;
    import com.pulumi.aws.elasticbeanstalk.Application;
    import com.pulumi.aws.elasticbeanstalk.ApplicationArgs;
    import com.pulumi.aws.elasticbeanstalk.ApplicationVersion;
    import com.pulumi.aws.elasticbeanstalk.ApplicationVersionArgs;
    import com.pulumi.asset.FileAsset;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var default_ = new BucketV2("default", BucketV2Args.builder()        
                .bucket("tftest.applicationversion.bucket")
                .build());
    
            var defaultBucketObjectv2 = new BucketObjectv2("defaultBucketObjectv2", BucketObjectv2Args.builder()        
                .bucket(default_.id())
                .key("beanstalk/go-v1.zip")
                .source(new FileAsset("go-v1.zip"))
                .build());
    
            var defaultApplication = new Application("defaultApplication", ApplicationArgs.builder()        
                .name("tf-test-name")
                .description("tf-test-desc")
                .build());
    
            var defaultApplicationVersion = new ApplicationVersion("defaultApplicationVersion", ApplicationVersionArgs.builder()        
                .name("tf-test-version-label")
                .application("tf-test-name")
                .description("application version")
                .bucket(default_.id())
                .key(defaultBucketObjectv2.id())
                .build());
    
        }
    }
    
    resources:
      default:
        type: aws:s3:BucketV2
        properties:
          bucket: tftest.applicationversion.bucket
      defaultBucketObjectv2:
        type: aws:s3:BucketObjectv2
        name: default
        properties:
          bucket: ${default.id}
          key: beanstalk/go-v1.zip
          source:
            fn::FileAsset: go-v1.zip
      defaultApplication:
        type: aws:elasticbeanstalk:Application
        name: default
        properties:
          name: tf-test-name
          description: tf-test-desc
      defaultApplicationVersion:
        type: aws:elasticbeanstalk:ApplicationVersion
        name: default
        properties:
          name: tf-test-version-label
          application: tf-test-name
          description: application version
          bucket: ${default.id}
          key: ${defaultBucketObjectv2.id}
    

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

    The following arguments are optional:

    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.

    The following arguments are optional:

    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.

    The following arguments are optional:

    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.

    The following arguments are optional:

    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.

    The following arguments are optional:

    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.

    The following arguments are optional:

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up 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.

    The following arguments are optional:

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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.

    The following arguments are optional:

    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
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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.

    The following arguments are optional:

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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.

    The following arguments are optional:

    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}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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.

    The following arguments are optional:

    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]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    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.

    The following arguments are optional:

    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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi