github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/elastic_beanstalk_application_version.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_elastic_beanstalk_application_version"
     4  sidebar_current: "docs-aws-resource-elastic-beanstalk-application-version"
     5  description: |-
     6    Provides an Elastic Beanstalk Application Version Resource
     7  ---
     8  
     9  # aws\_elastic\_beanstalk\_application\_<wbr>version
    10  
    11  Provides an Elastic Beanstalk Application Version Resource. Elastic Beanstalk allows
    12  you to deploy and manage applications in the AWS cloud without worrying about
    13  the infrastructure that runs those applications.
    14  
    15  This resource creates a Beanstalk Application Version that can be deployed to a Beanstalk
    16  Environment.
    17  
    18  ~> **NOTE on Application Version Resource:**  When using the Application Version resource with multiple 
    19  [Elastic Beanstalk Environments](elastic_beanstalk_environment.html) it is possible that an error may be returned
    20  when attempting to delete an Application Version while it is still in use by a different environment.
    21  To work around this you can:
    22  <ol>
    23  <li>Create each environment in a separate AWS account</li>
    24  <li>Create your `aws_elastic_beanstalk_application_version` resources with a unique names in your 
    25  Elastic Beanstalk Application. For example &lt;revision&gt;-&lt;environment&gt;.</li>
    26  </ol>
    27  
    28  ## Example Usage
    29  
    30  ```hcl
    31  resource "aws_s3_bucket" "default" {
    32    bucket = "tftest.applicationversion.bucket"
    33  }
    34  
    35  resource "aws_s3_bucket_object" "default" {
    36    bucket = "${aws_s3_bucket.default.id}"
    37    key    = "beanstalk/go-v1.zip"
    38    source = "go-v1.zip"
    39  }
    40  
    41  resource "aws_elastic_beanstalk_application" "default" {
    42    name        = "tf-test-name"
    43    description = "tf-test-desc"
    44  }
    45  
    46  resource "aws_elastic_beanstalk_application_version" "default" {
    47    name        = "tf-test-version-label"
    48    application = "tf-test-name"
    49    description = "application version created by terraform"
    50    bucket      = "${aws_s3_bucket.default.id}"
    51    key         = "${aws_s3_bucket_object.default.id}"
    52  }
    53  ```
    54  
    55  ## Argument Reference
    56  
    57  The following arguments are supported:
    58  
    59  * `name` - (Required) A unique name for the this Application Version.
    60  * `application` - (Required) Name of the Beanstalk Application the version is associated with.
    61  * `description` - (Optional) Short description of the Application Version.
    62  * `bucket` - (Required) S3 bucket that contains the Application Version source bundle.
    63  * `key` - (Required) S3 object that is the Application Version source bundle.
    64  * `force_delete` - (Optional) On delete, force an Application Version to be deleted when it may be in use
    65    by multiple Elastic Beanstalk Environments.
    66  
    67  ## Attributes Reference
    68  
    69  The following attributes are exported:
    70  
    71  * `name` - The Application Version name.