Default setting for "wait_for_ready_timeout", is 20 minutes. Within the "aws_elastic_beanstalk_application_version" resource I set this to 40m with the hopes of overriding the default. It will only run 20 minutes and timeout.
I went into the AWS console and did it manually. I seen by doing it manually in AWS console that this step takes a little over 20 minutes. I do not understand why it is timing out at 20, should run for 40.
Nothing special, the code below uses some vars in another file and thats it. The command is just - terraform apply
#Provider
provider "aws" {
#version = "~> 1.5"
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}
#S3 Bucket
resource "aws_s3_bucket" "eb_staging" {
bucket_prefix = "a_prefix-automate-eb1"
}
#S3 Bucket Object
#take zipped folder from working directory and upload it to S3 as etag hashed file
resource "aws_s3_bucket_object" "eb_staging" {
bucket = "${aws_s3_bucket.eb_staging.id}"
key = "v003"
source = "${var.eb_source_stage_path}"
etag = "${md5(file("${var.eb_source_stage_path}"))}"
}
#Application
resource "aws_elastic_beanstalk_application" "mvc-site" {
name = "mvc-site"
description = "mvc-site-desc"
}
#Application Version
resource "aws_elastic_beanstalk_application_version" "mvc_staging" {
name = "v003-mvc-site"
application = "mvc-site"
description = "app version staging mvc staging"
bucket = "${aws_s3_bucket.eb_staging.id}"
key = "${aws_s3_bucket_object.eb_staging.id}"
}
#Environment
resource "aws_elastic_beanstalk_environment" "mvc-staging" {
#still timeout at 20....==========================================
wait_for_ready_timeout = "40m"
name = "mvc-staging"
application = "${aws_elastic_beanstalk_application.mvc-site.name}"
solution_stack_name = "${var.eb_solution_stack}"
version_label = "${aws_elastic_beanstalk_application_version.mvc_staging.name}"
}