Skip to content

Commit

Permalink
Allow arbitrary envs to be set on Sombra containers
Browse files Browse the repository at this point in the history
  • Loading branch information
dmattia committed May 7, 2020
1 parent 6293e70 commit 841e6db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module container_definition {
log_configuration = var.log_configuration
log_secrets = var.log_secrets

environment = {
environment = merge({
# General Settings
EXTERNAL_PORT_HTTPS = var.external_port
INTERNAL_PORT_HTTPS = var.internal_port
Expand Down Expand Up @@ -101,7 +101,7 @@ module container_definition {
OAUTH_PROFILE_PICTURE_PATH = var.oauth_config.profile_picture_path
OAUTH_EMAIL_IS_VERIFIED_PATH = var.oauth_config.email_is_verified_path
OAUTH_EMAIL_IS_VERIFIED = var.oauth_config.email_is_verified
}
}, var.extra_envs)

secret_environment = {
for key, val in {
Expand Down
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,21 @@ variable override_alb_name {
description ="If set as a string, this custom name will be used on the alb resources"
}

variable extra_envs {
type = map(string)
description = <<EOF
A map of custom environment variables to set on the Sombra container.
The envs set here will overwrite any other envs on the container set in this module.
Example: {
SOME_ENV = "value"
SOME_LOGGING_LEVEL = "info"
}
EOF
default = {}
}

variable tags {
type = map(string)
description = "Tags to apply to all resources that support them"
Expand Down

0 comments on commit 841e6db

Please sign in to comment.