Skip to content

Commit 8b6e299

Browse files
authored
Added timeout variable (#20)
* Added timeout variable * Remove trunk * Address comments
1 parent 447a5e0 commit 8b6e299

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,11 @@ resource "aws_security_group" "default" {
340340
}
341341

342342
#
343+
343344
# Full list of options:
345+
344346
# http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elasticbeanstalkmanagedactionsplatformupdate
347+
345348
#
346349

347350
resource "aws_elastic_beanstalk_environment" "default" {
@@ -351,6 +354,8 @@ resource "aws_elastic_beanstalk_environment" "default" {
351354
tier = "WebServer"
352355
solution_stack_name = "${var.solution_stack_name}"
353356

357+
wait_for_ready_timeout = "${var.wait_for_ready_timeout}"
358+
354359
tags {
355360
Name = "${module.label.id}"
356361
Namespace = "${var.namespace}"
@@ -510,7 +515,6 @@ resource "aws_elastic_beanstalk_environment" "default" {
510515
name = "ListenerEnabled"
511516
value = "${var.loadbalancer_certificate_arn == "" ? "false" : "true"}"
512517
}
513-
514518
setting {
515519
namespace = "aws:elb:listener:${var.ssh_listener_port}"
516520
name = "ListenerProtocol"
@@ -526,13 +530,11 @@ resource "aws_elastic_beanstalk_environment" "default" {
526530
name = "ListenerEnabled"
527531
value = "${var.ssh_listener_enabled}"
528532
}
529-
530533
setting {
531534
namespace = "aws:elb:policies"
532535
name = "ConnectionSettingIdleTimeout"
533536
value = "${var.ssh_listener_enabled == "true" ? "3600" : "60"}"
534537
}
535-
536538
setting {
537539
namespace = "aws:elb:policies"
538540
name = "ConnectionDrainingEnabled"

variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ variable "solution_stack_name" {
108108
default = ""
109109
}
110110

111+
variable "wait_for_ready_timeout" {
112+
default = "20m"
113+
}
114+
111115
# From: http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region
112116
# Via: https://github.com/hashicorp/terraform/issues/7071
113117
variable "alb_zone_id" {

0 commit comments

Comments
 (0)