Skip to content

Commit

Permalink
Merge pull request #135 from dxw/allow-specifying-secrets-in-app-cont…
Browse files Browse the repository at this point in the history
…ainer-definition

Allow specifying secrets in app container definition
  • Loading branch information
rjw1 authored Jul 24, 2024
2 parents 5592864 + d7dff41 commit 82977fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions container-definitions/app.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
%{ if environment != "[]" }
"environment": "${environment},
%{ endif }
%{ if secrets != "[]" }
"secrets": "${secrets},
%{ endif }
%{ if environment_file_s3 != "" }
"environmentFiles": [
{
Expand Down
1 change: 1 addition & 0 deletions ecs-cluster-infrastructure-service-scheduled-task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "aws_ecs_task_definition" "infrastructure_ecs_cluster_service_scheduled
entrypoint = each.value["entrypoint"] != null ? jsonencode(each.value["entrypoint"]) : "[]"
environment_file_s3 = "${aws_s3_bucket.infrastructure_ecs_cluster_service_environment_files[0].arn}/${each.value["container_name"]}.env"
environment = jsonencode([])
secrets = jsonencode([])
container_port = 0
extra_hosts = each.value["extra_hosts"] != null ? jsonencode([
for extra_host in each.value["extra_hosts"] : {
Expand Down
1 change: 1 addition & 0 deletions ecs-cluster-infrastructure-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ resource "aws_ecs_task_definition" "infrastructure_ecs_cluster_service" {
entrypoint = each.value["container_entrypoint"] != null ? jsonencode(each.value["container_entrypoint"]) : "[]"
environment_file_s3 = "${aws_s3_bucket.infrastructure_ecs_cluster_service_environment_files[0].arn}/${each.key}.env"
environment = jsonencode([])
secrets = jsonencode([])
container_port = each.value["container_port"] != null ? each.value["container_port"] : 0
extra_hosts = each.value["container_extra_hosts"] != null ? jsonencode([
for extra_host in each.value["container_extra_hosts"] : {
Expand Down

0 comments on commit 82977fa

Please sign in to comment.