FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_elastic_beanstalk_environment

Provides an Elastic Beanstalk Environment Resource. Elastic Beanstalk allows you to deploy and manage applications in the AWS cloud without worrying about the infrastructure that runs those applications.

Environments are often things such as development, integration, or production.

Example Usage

resource "aws_elastic_beanstalk_application" "tftest" {
  name = "tf-test-name"
  description = "tf-test-desc"
}

resource "aws_elastic_beanstalk_environment" "tfenvtest" {
  name = "tf-test-name"
  application = "${aws_elastic_beanstalk_application.tftest.name}"
  solution_stack_name = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"
}

Argument Reference

The following arguments are supported:

Option Settings

Some options can be stack-specific, check AWS Docs for supported options and examples.

The setting and all_settings mappings support the following format:

Example With Options

resource "aws_elastic_beanstalk_application" "tftest" {
  name = "tf-test-name"
  description = "tf-test-desc"
}

resource "aws_elastic_beanstalk_environment" "tfenvtest" {
  name = "tf-test-name"
  application = "${aws_elastic_beanstalk_application.tftest.name}"
  solution_stack_name = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"
  setting {
    namespace = "aws:ec2:vpc"
    name      = "VPCId"
    value     = "vpc-xxxxxxxx"
  }

  setting {
    namespace = "aws:ec2:vpc"
    name      = "Subnets"
    value     = "subnet-xxxxxxxx"
  }  
}

Attributes Reference

The following attributes are exported:

Import

Elastic Beanstalk Environments can be imported using the id, e.g.

$ terraform import aws_elastic_beanstalk_environment.prodenv e-rpqsewtp2j

See the source of this document at Terraform.io