AWS Elastic Beanstalk Application Version

This page shows how to write Terraform and CloudFormation for Elastic Beanstalk Application Version and write them securely.

aws_elastic_beanstalk_application_version (Terraform)

The Application Version in Elastic Beanstalk can be configured in Terraform with the resource name aws_elastic_beanstalk_application_version. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "aws_elastic_beanstalk_application_version" "application_version" {
  count        = length(var.application_version)
  application  = element(var.application, lookup(var.application_version[count.index], "application_id"))
  bucket       = element(var.bucket, lookup(var.application_version[count.index], "bucket_id"))
  key          = element(var.object, lookup(var.application_version[count.index], "object_id"))
  name         = lookup(var.application_version[count.index], "name")

Parameters

Explanation in Terraform Registry

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_elastic_beanstalk_application_version resources with a unique names in your Elastic Beanstalk Application. For example <revision>-<environment>.

AWS::ElasticBeanstalk::ApplicationVersion (CloudFormation)

The ApplicationVersion in ElasticBeanstalk can be configured in CloudFormation with the resource name AWS::ElasticBeanstalk::ApplicationVersion. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

The AWS::ElasticBeanstalk::ApplicationVersion resource is an AWS Elastic Beanstalk resource type that specifies an application version, an iteration of deployable code, for an Elastic Beanstalk application.

Note After you create an application version with a specified Amazon S3 bucket and key location, you can't change that Amazon S3 location. If you change the Amazon S3 location, an attempt to launch an environment from the application version will fail.

Frequently asked questions

What is AWS Elastic Beanstalk Application Version?

AWS Elastic Beanstalk Application Version is a resource for Elastic Beanstalk of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Elastic Beanstalk Application Version?

For Terraform, the mikamakusa/terraform source code example is useful. See the Terraform Example section for further details.