Skip to content

Commit 8eeaf56

Browse files
pearson-lucas-devosterman
authored andcommitted
Add variable for environment tier (#22)
1 parent 52be329 commit 8eeaf56

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ Terraform module to provision AWS Elastic Beanstalk environment
4343
| ssh_listener_port |"22" |SSH port|
4444
| stage |"default" |Stage, e.g. 'prod', 'staging', 'dev', or 'test'|
4545
| tags |{} |Additional tags (e.g. `map('BusinessUnit`,`XYZ`)|
46+
| tier |"WebServer" |Elastic Beanstalk Environment tier, e.g. ('WebServer', 'Worker')|
4647
| updating_max_batch |"1" |Maximum count of instances up during update|
4748
| updating_min_in_service |"1" |Minimum count of instances up during update|
4849
| vpc_id |__REQUIRED__ |ID of the VPC in which to provision the AWS resources|
50+
| wait_for_ready_timeout |"20m" ||
4951
| zone_id |"" |Route53 parent zone ID. The module will create sub-domain DNS records in the parent zone for the EB environment|
5052

5153
## Output

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ resource "aws_elastic_beanstalk_environment" "default" {
351351
name = "${module.label.id}"
352352
application = "${var.app}"
353353

354-
tier = "WebServer"
354+
tier = "${var.tier}"
355355
solution_stack_name = "${var.solution_stack_name}"
356356

357357
wait_for_ready_timeout = "${var.wait_for_ready_timeout}"

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,8 @@ variable "env_vars" {
199199
type = "map"
200200
description = "Map of custom ENV variables to be provided to the Jenkins application running on Elastic Beanstalk, e.g. `env_vars = { JENKINS_USER = 'admin' JENKINS_PASS = 'xxxxxx' }`"
201201
}
202+
203+
variable "tier" {
204+
default = "WebServer"
205+
description = "Elastic Beanstalk Environment tier, e.g. ('WebServer', 'Worker')"
206+
}

0 commit comments

Comments
 (0)