From 733ada2a2663cc814be354b8e3a720fa6402de64 Mon Sep 17 00:00:00 2001 From: James Winegar Date: Tue, 17 Sep 2024 16:02:34 -0500 Subject: [PATCH] Add RUST_LOG to cloud_init.yaml for google-cloud gateway RIG (#6736) Signed-off-by: James Winegar --- .../google-cloud/apps/gateway-region-instance-group/main.tf | 5 +++-- .../gateway-region-instance-group/templates/cloud-init.yaml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/terraform/modules/google-cloud/apps/gateway-region-instance-group/main.tf b/terraform/modules/google-cloud/apps/gateway-region-instance-group/main.tf index 15a138ca4..5c710fd1d 100644 --- a/terraform/modules/google-cloud/apps/gateway-region-instance-group/main.tf +++ b/terraform/modules/google-cloud/apps/gateway-region-instance-group/main.tf @@ -108,8 +108,9 @@ resource "google_compute_instance_template" "application" { metadata = { user-data = templatefile("${path.module}/templates/cloud-init.yaml", { - project_id = var.project_id - otlp_grpc_endpoint = "127.0.0.1:4317" + project_id = var.project_id + otlp_grpc_endpoint = "127.0.0.1:4317" + observability_log_level = var.observability_log_level firezone_token = var.token firezone_api_url = var.api_url diff --git a/terraform/modules/google-cloud/apps/gateway-region-instance-group/templates/cloud-init.yaml b/terraform/modules/google-cloud/apps/gateway-region-instance-group/templates/cloud-init.yaml index 6973477a8..0f46a3802 100644 --- a/terraform/modules/google-cloud/apps/gateway-region-instance-group/templates/cloud-init.yaml +++ b/terraform/modules/google-cloud/apps/gateway-region-instance-group/templates/cloud-init.yaml @@ -49,6 +49,7 @@ runcmd: export FIREZONE_LOG_FORMAT="google-cloud" export FIREZONE_GOOGLE_CLOUD_PROJECT_ID="${project_id}" export FIREZONE_OTLP_GRPC_ENDPOINT="${otlp_grpc_endpoint}" + export RUST_LOG="${observability_log_level}" curl -fsSL https://raw.githubusercontent.com/firezone/firezone/main/scripts/gateway-systemd-install.sh -o /tmp/gateway-install.sh bash /tmp/gateway-install.sh rm /tmp/gateway-install.sh