Skip to content

Commit

Permalink
feat(ecs): add KONG_PLUGINS variable allowing to load other plugins (#88
Browse files Browse the repository at this point in the history
)

Signed-off-by: Alvaro Lopez Hernandez <[email protected]>
  • Loading branch information
alv-lop authored Oct 31, 2022
1 parent ff0cea5 commit eea3293
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/ecs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ data "template_file" "kong_task_definition_cp" {
cluster_cert = var.cluster_cert
cluster_key = var.cluster_key
kong_log_level = var.kong_log_level
kong_plugins = var.kong_plugins
entrypoint = var.entrypoint
custom_nginx_conf = base64encode(var.custom_nginx_conf)
}
Expand Down Expand Up @@ -171,6 +172,7 @@ data "template_file" "kong_task_definition_dp" {
cluster_cert = var.cluster_cert
cluster_key = var.cluster_key
kong_log_level = var.kong_log_level
kong_plugins = var.kong_plugins
entrypoint = var.entrypoint
custom_nginx_conf = base64encode(var.custom_nginx_conf)
}
Expand Down
6 changes: 6 additions & 0 deletions modules/ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,9 @@ variable "kong_portal_api_url" {
description = "The Portal API URL of the Portal."
type = string
}

variable "kong_plugins" {
description = "Comma-separated list of Kong plugins, passed through the variable KONG_PLUGINS"
type = string
default = "bundled"
}
4 changes: 4 additions & 0 deletions templates/ecs/kong_control_plane.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
"name": "KONG_STATUS_SSL_CERT_KEY",
"value": "/usr/local/kong/kong_clustering/cluster.key"
},
{
"name": "KONG_PLUGINS",
"value": "${kong_plugins}"
},
{
"name": "KONG_DATABASE",
"value": "postgres"
Expand Down
4 changes: 4 additions & 0 deletions templates/ecs/kong_data_plane.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
"name": "KONG_ROLE",
"value": "data_plane"
},
{
"name": "KONG_PLUGINS",
"value": "${kong_plugins}"
},
{
"name": "KONG_DATABASE",
"value": "off"
Expand Down

0 comments on commit eea3293

Please sign in to comment.