ApplicationVersion class
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.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,
});
import pulumi
import pulumi_aws as aws
default = aws.s3.Bucket("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.key)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var @default = new Aws.S3.Bucket("default", new()
{
BucketName = "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.Key,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/elasticbeanstalk"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := s3.NewBucket(ctx, "default", &s3.BucketArgs{
Bucket: pulumi.String("tftest.applicationversion.bucket"),
})
if err != nil {
return err
}
defaultBucketObjectv2, err := s3.NewBucketObjectv2(ctx, "default", &s3.BucketObjectv2Args{
Bucket: _default.ID().ToIDOutput().ToStringOutput(),
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().ToIDOutput().ToStringOutput(),
Key: defaultBucketObjectv2.Key,
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_s3_bucket" "default" {
bucket = "tftest.applicationversion.bucket"
}
resource "aws_s3_bucketobjectv2" "default" {
bucket = aws_s3_bucket.default.id
key = "beanstalk/go-v1.zip"
source = fileAsset("go-v1.zip")
}
resource "aws_elasticbeanstalk_application" "default" {
name = "tf-test-name"
description = "tf-test-desc"
}
resource "aws_elasticbeanstalk_applicationversion" "default" {
name = "tf-test-version-label"
application = "tf-test-name"
description = "application version"
bucket = aws_s3_bucket.default.id
key = aws_s3_bucketobjectv2.default.key
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.Bucket;
import com.pulumi.aws.s3.BucketArgs;
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.ArrayList;
import java.util.Arrays;
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 Bucket("default", BucketArgs.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.key())
.build());
}
}
resources:
default:
type: aws:s3:Bucket
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.key}
Constructors
- ApplicationVersion(String name, {ApplicationVersionArgs? args, CustomResourceOptions? options})
-
Creates a new ApplicationVersion.
nameThe Pulumi resource name.argsArguments used to configure this ApplicationVersion. The set of arguments for ApplicationVersion.optionsResource options controlling this resource's behavior. - ApplicationVersion.reference(String urn)
- Creates a typed reference to an existing ApplicationVersion resource.
Properties
-
application
↔ Output<
String> -
Name of the Beanstalk Application the version is associated with.
latefinal
-
arn
↔ Output<
String> -
ARN assigned by AWS for this Elastic Beanstalk Application.
latefinal
-
bucket
↔ Output<
String> -
S3 bucket that contains the Application Version source bundle.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
description
↔ Output<
String?> -
Short description of the Application Version.
latefinal
-
forceDelete
↔ Output<
bool?> -
On delete, force an Application Version to be deleted when it may be in use by multiple Elastic Beanstalk Environments.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
key
↔ Output<
String> -
S3 object that is the Application Version source bundle.
latefinal
-
name
↔ Output<
String> -
Unique name for the this Application Version.
latefinal
-
process
↔ Output<
bool?> -
Pre-processes and validates the environment manifest (env.yaml ) and configuration files (*.config files in the .ebextensions folder) in the source bundle. Validating configuration files can identify issues prior to deploying the application version to an environment. You must turn processing on for application versions that you create using AWS CodeBuild or AWS CodeCommit. For application versions built from a source bundle in Amazon S3, processing is optional. It validates Elastic Beanstalk configuration files. It doesn’t validate your application’s configuration files, like proxy server or Docker configuration.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Key-value map of tags for the Elastic Beanstalk Application Version. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {ApplicationVersionState? state, CustomResourceOptions? options}) → ApplicationVersion -
Gets an existing ApplicationVersion resource's state with the given
nameandid.