Skip to content

Commit

Permalink
Map environment (#62)
Browse files Browse the repository at this point in the history
* Update variables.tf

* Add map_environment argument

* Updated README.md

* Update variables.tf

Co-authored-by: Andriy Knysh <[email protected]>

* Updated README.md

Co-authored-by: actions-bot <[email protected]>
Co-authored-by: Andriy Knysh <[email protected]>
  • Loading branch information
3 people authored Jul 30, 2020
1 parent 376db54 commit 0584c0a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ Available targets:
| launch\_type | The ECS launch type (valid options: FARGATE or EC2) | `string` | `"FARGATE"` | no |
| log\_driver | The log driver to use for the container. If using Fargate launch type, only supported value is awslogs | `string` | `"awslogs"` | no |
| log\_retention\_in\_days | The number of days to retain logs for the log group | `number` | `null` | no |
| map\_environment | The environment variables to pass to the container. This is a map of string: {key: value}. `environment` overrides `map_environment` | `map(string)` | `null` | no |
| mount\_points | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume` | <pre>list(object({<br> containerPath = string<br> sourceVolume = string<br> }))</pre> | `[]` | no |
| name | Name of the application | `string` | n/a | yes |
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
| launch\_type | The ECS launch type (valid options: FARGATE or EC2) | `string` | `"FARGATE"` | no |
| log\_driver | The log driver to use for the container. If using Fargate launch type, only supported value is awslogs | `string` | `"awslogs"` | no |
| log\_retention\_in\_days | The number of days to retain logs for the log group | `number` | `null` | no |
| map\_environment | The environment variables to pass to the container. This is a map of string: {key: value}. `environment` overrides `map_environment` | `map(string)` | `null` | no |
| mount\_points | Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume` | <pre>list(object({<br> containerPath = string<br> sourceVolume = string<br> }))</pre> | `[]` | no |
| name | Name of the application | `string` | n/a | yes |
| namespace | Namespace (e.g. `eg` or `cp`) | `string` | `""` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module "container_definition" {
stop_timeout = var.container_stop_timeout
healthcheck = var.healthcheck
environment = var.environment
map_environment = var.map_environment
port_mappings = var.port_mappings
privileged = var.privileged
secrets = var.secrets
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ variable "environment" {
default = null
}

variable "map_environment" {
type = map(string)
description = "The environment variables to pass to the container. This is a map of string: {key: value}. `environment` overrides `map_environment`"
default = null
}

variable "entrypoint" {
type = list(string)
description = "The entry point that is passed to the container"
Expand Down

0 comments on commit 0584c0a

Please sign in to comment.