github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/elastic_beanstalk_environment.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_elastic_beanstalk_environment"
     4  sidebar_current: "docs-aws-resource-elastic-beanstalk-environment"
     5  description: |-
     6    Provides an Elastic Beanstalk Environment Resource
     7  ---
     8  
     9  # aws\_elastic\_beanstalk\_<wbr>environment
    10  
    11  Provides an Elastic Beanstalk Environment 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  Environments are often things such as `development`, `integration`, or
    16  `production`.
    17  
    18  ## Example Usage
    19  
    20  
    21  ```
    22  resource "aws_elastic_beanstalk_application" "tftest" {
    23    name        = "tf-test-name"
    24    description = "tf-test-desc"
    25  }
    26  
    27  resource "aws_elastic_beanstalk_environment" "tfenvtest" {
    28    name                = "tf-test-name"
    29    application         = "${aws_elastic_beanstalk_application.tftest.name}"
    30    solution_stack_name = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `name` - (Required) A unique name for this Environment. This name is used
    39    in the application URL
    40  * `application` – (Required) Name of the application that contains the version
    41    to be deployed
    42  * `cname_prefix` - (Optional) Prefix to use for the fully qualified DNS name of
    43    the Environment.
    44  * `description` - (Optional) Short description of the Environment
    45  * `tier` - (Optional) Elastic Beanstalk Environment tier. Valid values are `Worker`
    46    or `WebServer`. If tier is left blank `WebServer` will be used.
    47  * `setting` – (Optional) Option settings to configure the new Environment. These
    48    override specific values that are set as defaults. The format is detailed
    49    below in [Option Settings](#option-settings)
    50  * `solution_stack_name` – (Optional) A solution stack to base your environment
    51  off of. Example stacks can be found in the [Amazon API documentation][1]
    52  * `template_name` – (Optional) The name of the Elastic Beanstalk Configuration
    53    template to use in deployment
    54  * `wait_for_ready_timeout` - (Default: `10m`) The maximum
    55    [duration](https://golang.org/pkg/time/#ParseDuration) that Terraform should
    56    wait for an Elastic Beanstalk Environment to be in a ready state before timing
    57    out.
    58  * `poll_interval` – The time between polling the AWS API to
    59  check if changes have been applied. Use this to adjust the rate of API calls
    60  for any `create` or `update` action. Minimum `10s`, maximum `180s`. Omit this to
    61  use the default behavior, which is an exponential backoff
    62  * `version_label` - (Optional) The name of the Elastic Beanstalk Application Version
    63  to use in deployment.
    64  * `tags` – (Optional) A set of tags to apply to the Environment. **Note:** at
    65  this time the Elastic Beanstalk API does not provide a programatic way of
    66  changing these tags after initial application
    67  
    68  
    69  ## Option Settings
    70  
    71  Some options can be stack-specific, check [AWS Docs](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html)
    72  for supported options and examples.
    73  
    74  The `setting` and `all_settings` mappings support the following format:
    75  
    76  * `namespace` - unique namespace identifying the option's associated AWS resource
    77  * `name` - name of the configuration option
    78  * `value` - value for the configuration option
    79  * `resource` - (Optional) resource name for [scheduled action](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalingscheduledaction)
    80  
    81  ### Example With Options
    82  
    83  ```
    84  resource "aws_elastic_beanstalk_application" "tftest" {
    85    name        = "tf-test-name"
    86    description = "tf-test-desc"
    87  }
    88  
    89  resource "aws_elastic_beanstalk_environment" "tfenvtest" {
    90    name                = "tf-test-name"
    91    application         = "${aws_elastic_beanstalk_application.tftest.name}"
    92    solution_stack_name = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"
    93  
    94    setting {
    95      namespace = "aws:ec2:vpc"
    96      name      = "VPCId"
    97      value     = "vpc-xxxxxxxx"
    98    }
    99  
   100    setting {
   101      namespace = "aws:ec2:vpc"
   102      name      = "Subnets"
   103      value     = "subnet-xxxxxxxx"
   104    }
   105  }
   106  ```
   107  
   108  ## Attributes Reference
   109  
   110  The following attributes are exported:
   111  
   112  * `name` - Name of the Elastic Beanstalk Environment.
   113  * `description` - Description of the Elastic Beanstalk Environment.
   114  * `tier` - The environment tier specified.
   115  * `application` – The Elastic Beanstalk Application specified for this environment.
   116  * `setting` – Settings specifically set for this Environment.
   117  * `all_settings` – List of all option settings configured in the Environment. These
   118    are a combination of default settings and their overrides from `setting` in
   119    the configuration.
   120  * `cname` - Fully qualified DNS name for the Environment.
   121  * `autoscaling_groups` - The autoscaling groups used by this environment.
   122  * `instances` - Instances used by this environment.
   123  * `launch_configurations` - Launch configurations in use by this environment.
   124  * `load_balancers` - Elastic load balancers in use by this environment.
   125  * `queues` - SQS queues in use by this environment.
   126  * `triggers` - Autoscaling triggers in use by this environment.
   127  
   128  
   129  
   130  [1]: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html
   131  
   132  
   133  ## Import
   134  
   135  Elastic Beanstalk Environments can be imported using the `id`, e.g.
   136  
   137  ```
   138  $ terraform import aws_elastic_beanstalk_environment.prodenv e-rpqsewtp2j
   139  ```