Try AWS Native preview for resources not in the classic version.
aws.elasticbeanstalk.ApplicationVersion
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var defaultBucketV2 = new Aws.S3.BucketV2("defaultBucketV2");
var defaultBucketObjectv2 = new Aws.S3.BucketObjectv2("defaultBucketObjectv2", new()
{
Bucket = defaultBucketV2.Id,
Key = "beanstalk/go-v1.zip",
Source = new FileAsset("go-v1.zip"),
});
var defaultApplication = new Aws.ElasticBeanstalk.Application("defaultApplication", new()
{
Description = "tf-test-desc",
});
var defaultApplicationVersion = new Aws.ElasticBeanstalk.ApplicationVersion("defaultApplicationVersion", new()
{
Application = "tf-test-name",
Description = "application version",
Bucket = defaultBucketV2.Id,
Key = defaultBucketObjectv2.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 {
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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
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 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 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.
- Force
Delete 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:
- 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.
- Force
Delete 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:
- 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.
- force
Delete 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:
- 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.
- force
Delete 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:
- {[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:
- 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.
- force
Delete 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:
- 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.
- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- 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.
- Force
Delete 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:
- 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.- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- Force
Delete 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:
- 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.- map[string]string
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- force
Delete 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:
- 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.- Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- force
Delete 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:
- {[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.- {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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:
- 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.- Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
- force
Delete 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:
- 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.- Map<String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.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.
Try AWS Native preview for resources not in the classic version.