forked from mtusi2026/mtusi2026lab7
59 lines
1.2 KiB
HCL
59 lines
1.2 KiB
HCL
pid_file = "/tmp/bao-agent.pid"
|
|
log_level = "error"
|
|
vault {
|
|
address = "https://openbao:8200"
|
|
ca_cert = "/pki/ca.crt"
|
|
}
|
|
auto_auth {
|
|
method "cert" {
|
|
mount_path = "auth/cert"
|
|
config = {
|
|
name = "api"
|
|
ca_cert = "/pki/ca.crt"
|
|
client_cert = "/pki/cert.pem"
|
|
client_key = "/pki/key.pem"
|
|
reload = true
|
|
}
|
|
}
|
|
}
|
|
template_config {
|
|
static_secret_render_interval = "5s"
|
|
exit_on_retry_failure = false
|
|
}
|
|
template {
|
|
destination = "/run/app/database_url"
|
|
perms = "0600"
|
|
backup = false
|
|
error_on_missing_key = true
|
|
contents = <<EOT
|
|
{{ with secret "kv/data/api" }}{{ .Data.data.database_url }}{{ end }}
|
|
EOT
|
|
}
|
|
template {
|
|
destination = "/run/app/cache_url"
|
|
perms = "0600"
|
|
backup = false
|
|
error_on_missing_key = true
|
|
contents = <<EOT
|
|
{{ with secret "kv/data/api" }}{{ .Data.data.cache_url }}{{ end }}
|
|
EOT
|
|
}
|
|
template {
|
|
destination = "/run/app/s3.json"
|
|
perms = "0600"
|
|
backup = false
|
|
error_on_missing_key = true
|
|
contents = <<EOT
|
|
{{ with secret "kv/data/api" }}{{ .Data.data.s3_json }}{{ end }}
|
|
EOT
|
|
}
|
|
template {
|
|
destination = "/run/app/freshness"
|
|
perms = "0600"
|
|
backup = false
|
|
error_on_missing_key = true
|
|
contents = <<EOT
|
|
{{ with secret "kv/data/api" }}{{ timestamp }}{{ end }}
|
|
EOT
|
|
}
|