Skip to content

Commit

Permalink
auto solution stack (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
beatthat authored Feb 2, 2021
1 parent 41d5ea5 commit 3a5723f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 6 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ module "elastic_beanstalk_application" {

data "aws_elastic_beanstalk_hosted_zone" "current" {}

data "aws_elastic_beanstalk_solution_stack" "multi_docker" {
most_recent = true
name_regex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$"
}

module "elastic_beanstalk_environment" {
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment.git?ref=tags/0.34.0"
namespace = var.eb_env_namespace
Expand Down Expand Up @@ -107,11 +112,9 @@ module "elastic_beanstalk_environment" {

healthcheck_url = var.eb_env_healthcheck_url
application_port = var.eb_env_application_port

// https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html
// https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.docker
solution_stack_name = var.eb_env_solution_stack_name

solution_stack_name = data.aws_elastic_beanstalk_solution_stack.multi_docker.name
additional_settings = var.eb_env_additional_settings
env_vars = merge(
var.eb_env_env_vars,
Expand Down
6 changes: 0 additions & 6 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,6 @@ variable "eb_env_root_volume_type" {
default = "gp2"
}

variable "eb_env_solution_stack_name" {
type = string
description = "Elastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. For more info, see https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html"
default = "64bit Amazon Linux 2018.03 v2.25.0 running Multi-container Docker 19.03.13-ce (Generic)"
}

variable "eb_env_stage" {
type = string
description = "Stage, e.g. 'prod', 'staging', 'dev', or 'test'"
Expand Down

0 comments on commit 3a5723f

Please sign in to comment.