From 425846af79c144c90112a5f416086b46357f7719 Mon Sep 17 00:00:00 2001 From: Gus Luxton Date: Tue, 29 Oct 2024 13:50:11 -0300 Subject: [PATCH] ha-autoscale-cluster: Source unit file environment variables from /etc/default/teleport (#48040) --- assets/aws/files/system/teleport-proxy-acm.service | 2 -- assets/aws/files/system/teleport-proxy.service | 2 -- .../aws/terraform/ha-autoscale-cluster/proxy-user-data.tpl | 5 +++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/aws/files/system/teleport-proxy-acm.service b/assets/aws/files/system/teleport-proxy-acm.service index 757c9219e4b0d..ca5e913a081a6 100644 --- a/assets/aws/files/system/teleport-proxy-acm.service +++ b/assets/aws/files/system/teleport-proxy-acm.service @@ -11,8 +11,6 @@ Restart=always RestartSec=5 RuntimeDirectory=teleport EnvironmentFile=-/etc/default/teleport -# TODO(gus): REMOVE IN 17.0.0 - /etc/default/teleport should be used instead -EnvironmentFile=/etc/teleport.d/conf ExecStartPre=/usr/local/bin/teleport-ssm-get-token ExecStart=/usr/local/bin/teleport start --config=/etc/teleport.yaml --diag-addr=127.0.0.1:3000 --pid-file=/run/teleport/teleport.pid # systemd before 239 needs an absolute path diff --git a/assets/aws/files/system/teleport-proxy.service b/assets/aws/files/system/teleport-proxy.service index 8fe4ba5985ce6..3c31de24b1178 100644 --- a/assets/aws/files/system/teleport-proxy.service +++ b/assets/aws/files/system/teleport-proxy.service @@ -11,8 +11,6 @@ Restart=always RestartSec=5 RuntimeDirectory=teleport EnvironmentFile=-/etc/default/teleport -# TODO(gus): REMOVE IN 17.0.0 - /etc/default/teleport should be used instead -EnvironmentFile=/etc/teleport.d/conf ExecStartPre=/usr/local/bin/teleport-ssm-get-token ExecStartPre=/bin/aws s3 sync s3://${TELEPORT_S3_BUCKET}/live/${TELEPORT_DOMAIN_NAME} /var/lib/teleport ExecStart=/usr/local/bin/teleport start --config=/etc/teleport.yaml --diag-addr=127.0.0.1:3000 --pid-file=/run/teleport/teleport.pid diff --git a/examples/aws/terraform/ha-autoscale-cluster/proxy-user-data.tpl b/examples/aws/terraform/ha-autoscale-cluster/proxy-user-data.tpl index 3b348c8c4a237..97071d35b014d 100644 --- a/examples/aws/terraform/ha-autoscale-cluster/proxy-user-data.tpl +++ b/examples/aws/terraform/ha-autoscale-cluster/proxy-user-data.tpl @@ -14,3 +14,8 @@ TELEPORT_ENABLE_POSTGRES=${enable_postgres_listener} USE_ACM=${use_acm} USE_TLS_ROUTING=${use_tls_routing} EOF +cat >>/etc/default/teleport <