Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config files don't support environment variables #268

Open
mdtomo opened this issue Sep 18, 2022 · 1 comment
Open

Config files don't support environment variables #268

mdtomo opened this issue Sep 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mdtomo
Copy link

mdtomo commented Sep 18, 2022

I've tried adding environment variables to my config but it appears they aren't parsed. Example below for a sample yml config. The environment variables work correctly in haproxy.cfg as I tested this by putting the value for $PASSWORD directly into thedataplaneapi.yml config. I tried this with the hcl config type declaring a variable block but parsing failed on the line where type is declared.

variable "password" {
  type = string
}

Throws error unknown token: 6:10 IDENT string

dataplaneapi.yml

name: famous_condor
dataplaneapi:
  host: 0.0.0.0
  port: 8080
  user:
  - name: admin
    insecure: true
    password: ${PASSWORD}
  resources:
    maps_dir: /etc/haproxy/maps
    ssl_certs_dir: /etc/haproxy/ssl
    spoe_dir: /etc/haproxy/spoe
haproxy:
  config_file: /etc/haproxy/haproxy.cfg
  haproxy_bin: /usr/local/sbin/haproxy
  reload:
    reload_cmd: kill -SIGUSR2 1
    restart_cmd: kill -SIGUSR2 1

haproxy.cfg

userlist proxy-userlist
    user admin insecure-password "$PASSWORD"

I'm assuming environment variables in dataplane api config files aren't currently supported?

@mjuraga
Copy link
Collaborator

mjuraga commented Nov 28, 2022

Currently we are not supporting env variables in the config files. We can put that as a feature request.

@mjuraga mjuraga added the enhancement New feature or request label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants