terraform-aws-elastic-beanstalk-environment
terraform-aws-elastic-beanstalk-environment copied to clipboard
Do not downgrade solution stack if managed actions are enabled
Currently we do not have solution stack attribute ignored. Beanstalk automatically updates environment due to managed actions being allowed, when we run terraform again, it downgrades it back to the version specified in the solution stack attribute.
I tried dynamic block approach, apparently lifecycle block isn't allowed to be dynamic.
You can get the latest solution stack with a data object e.g.:
data "aws_elastic_beanstalk_solution_stack" "multi_docker" {
most_recent = true
name_regex = "^64bit Amazon Linux (.*)(v2\\.)(.*) Multi-container Docker (.*)$"
}
and use that. The only downside is that you will trigger the managed updates if you run terraform between release of the new solution stack and the time your application is updated
I would prefer to see solution_stack left alone until I decide to change it.
The input update_level should not be set if minor or patch are not passed in.