Skip to content

Commit f4fd9a8

Browse files
committed
feat: expose log_level and log_format
1 parent 2ec24ad commit f4fd9a8

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "firezone" {
7979
export FIREZONE_NAME="${var.firezone_name}"
8080
export FIREZONE_ID="$(head -c 32 /dev/urandom | sha256sum | cut -d' ' -f1)"
8181
export FIREZONE_API_URL="${var.firezone_api_url}"
82+
export LOG_LEVEL="${var.log_level}"
83+
export LOG_FORMAT="${var.log_format}"
8284
8385
# Download and execute the Firezone installation script
8486
# The extension handler will retry this automatically if it fails

variables.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,22 @@ variable "platform_fault_domain_count" {
9999
type = number
100100
default = 3
101101
}
102+
103+
variable "log_level" {
104+
description = "Sets RUST_LOG environment variable which applications should use to configure Rust Logger. Default: 'info'."
105+
nullable = false
106+
type = string
107+
default = "info"
108+
}
109+
110+
variable "log_format" {
111+
description = "Sets RUST_LOG_FORMAT environment variable which applications should use to configure Rust Logger format. Default: 'human'."
112+
nullable = false
113+
type = string
114+
default = "human"
115+
116+
validation {
117+
condition = contains(["human", "json"], var.log_format)
118+
error_message = "log_format must be either 'human' or 'json'."
119+
}
120+
}

0 commit comments

Comments
 (0)