Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot include environment variables #6

Closed
mike-zipit opened this issue Jun 17, 2018 · 2 comments
Closed

Cannot include environment variables #6

mike-zipit opened this issue Jun 17, 2018 · 2 comments
Assignees

Comments

@mike-zipit
Copy link

Not sure what is going on, and after a couple of hours I'm stumped. Here's a failing definition:

module "container_definition" {
  source           = "git::https://github.com/cloudposse/terraform-aws-ecs-container-definition.git?ref=0.1.3"
  container_name   = "${var.name}"
  container_image  = "nginx:latest"
  container_memory = 128
  container_port   = 80

  environment      = [
    {
      name  = "AWS_REGION",
      value = "${var.aws_region}"
    },
    {
      name  = "NODE_ENV",
      value = "${var.stage}"
    },
    {
      name  = "PORT",
      value = "80"
    },
    {
      name  = "DEBUG",
      value = "server:*"
    }
  ]

  log_options      = {
    "awslogs-region"        = "${var.aws_region}"
    "awslogs-group"         = "${aws_cloudwatch_log_group.app.name}"
    "awslogs-stream-prefix" = "${var.name}"
  }
}
@fernandosilvacornejo
Copy link
Contributor

Not sure if related, but this PR allows the output of this module to be used for ECS task definitions when there are integers or boolean env vars.
#9

@osterman
Copy link
Member

Will close this for now. If anyone is having this problem, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants