Releases: cloudposse/terraform-aws-elastic-beanstalk-environment
Releases · cloudposse/terraform-aws-elastic-beanstalk-environment
Change custom ENV vars key/value calculation
What
- Changed the way the custom ENV vars are calculated in
aws:elasticbeanstalk:application:environmentsetting
Why
- Using
null_resourceto generate key/value pairs for ENV vars like this:
resource "null_resource" "env_vars" {
count = 50
triggers {
key = "${count.index < length(var.env_vars) ?
element(concat(keys(var.env_vars),list("")), count.index) :
format(var.env_default_key, count.index+1)
}"
value = "${count.index < length(var.env_vars) ?
lookup(var.env_vars, element(concat(keys(var.env_vars),list("")), count.index), var.env_default_value) :
var.env_default_value
}"
}
}
setting {
namespace = "aws:elasticbeanstalk:application:environment"
name = "${null_resource.env_vars.0.triggers.key}"
value = "${null_resource.env_vars.0.triggers.value}"
}
setting {
namespace = "aws:elasticbeanstalk:application:environment"
name = "${null_resource.env_vars.1.triggers.key}"
value = "${null_resource.env_vars.1.triggers.value}"
}
DOES NOT work when it's used from top-level modules AND when there is a dependency between modules AND terraform apply or terraform plan runs for the first time (meaning no AWS resources have been created yet), e.g.
module "elastic_beanstalk_environment" {
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment.git?ref=tags/0.2.4"
env_vars = "${
merge(
map(
"EFS_HOST", "${module.efs.dns_name}"
), var.env_vars
)
}"
}
module "efs" {
source = "git::https://github.com/cloudposse/terraform-aws-efs.git?ref=tags/0.3.1"
namespace = "${var.namespace}"
name = "${var.name}"
stage = "${var.stage}"
security_groups = ["${module.elastic_beanstalk_environment.security_group_id}"]
}
Terraform throws the error:
the key for
null_resource.env_vars.0.triggers.keycould not be found
Looks like Terraform can't resolve the module inter-dependencies when using null_resource.
The proposed way of generating key/value pairs for ENV vars works in all cases.
Add `Application Load Balancer` health check settings
What
- Added
Application Load Balancerhealth check settings in namespaceaws:elasticbeanstalk:environment:process:default
Why
- The
ALBhealth check does not take into account theElastic Beanstalkhealth check path
References
Support Empty Env List and Return Stable Values
0.2.3 Support Empty Env List and Return Stable Values (#11)
Add http to https redirect
Add http to https redirect
Rename Repo
What
- Rename repo
Why
- To conform to community standard: https://www.terraform.io/docs/registry/modules/publish.html
Propagate `attributes` and `tags` from `variables.tf` to internal `label` module
Propagate attributes and tags from variables.tf to internal label module
0.1.3: Remove `template_name` (#5)
* Remove `template_name` * Remove `template_name` and `var.settings`
0.1.2
solution_stack_name-attribute
0.1.1 Add `solution_stack_name` attribute to `aws_elastic_beanstalk_environ…