terraform-aws-elastic-beanstalk-environment icon indicating copy to clipboard operation
terraform-aws-elastic-beanstalk-environment copied to clipboard

Do not downgrade solution stack if managed actions are enabled

Open aj-jaswanth-ee opened this issue 6 years ago • 3 comments

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.

aj-jaswanth-ee avatar Oct 25 '19 08:10 aj-jaswanth-ee

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

roock avatar Dec 12 '19 11:12 roock

I would prefer to see solution_stack left alone until I decide to change it.

razorsedge avatar May 11 '22 13:05 razorsedge

The input update_level should not be set if minor or patch are not passed in.

razorsedge avatar May 11 '22 13:05 razorsedge