Skip to content

Commit

Permalink
New feature: environment files (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
feraudet authored Feb 10, 2023
1 parent f021b23 commit ae0b0fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
17 changes: 9 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,15 @@ locals {
}, local.log_multiline_pattern)

container_definition = merge({
"name" = var.container_name != "" ? var.container_name : var.name_prefix
"image" = var.task_container_image,
"essential" = true
"portMappings" = local.task_container_port_mappings
"stopTimeout" = var.stop_timeout
"command" = var.task_container_command
"environment" = local.task_container_environment
"MountPoints" = local.task_container_mount_points
"name" = var.container_name != "" ? var.container_name : var.name_prefix
"image" = var.task_container_image,
"essential" = true
"portMappings" = local.task_container_port_mappings
"stopTimeout" = var.stop_timeout
"command" = var.task_container_command
"environment" = local.task_container_environment
"environmentFiles" = var.task_container_environment_file
"MountPoints" = local.task_container_mount_points
"logConfiguration" = {
"logDriver" = "awslogs"
"options" = local.log_configuration_options
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ variable "task_container_environment" {
type = map(string)
}

variable "task_container_environment_file" {
description = "The environment variables to pass to a container."
default = []
type = list(object({ type = string, value = string }))
}

variable "log_group_name" {
description = "The name of the provided CloudWatch Logs log group to use."
default = ""
Expand Down

0 comments on commit ae0b0fa

Please sign in to comment.