Skip to content

Possible to use environment variables in yaml files? #49

Closed Answered by euzu
36-chambers asked this question in Q&A
Discussion options

You must be logged in to vote

I have added env variable support to api-proxy.yml for username, password and token

user:
- target: simple
  credentials:
  - username: ${env:M3UF_USR_ME}
    password: ${env:M3UF_PWD_ME}
    token: ${env:M3UF_TKN_ME}
    proxy: redirect
    server: null

For this example you need to define environment variables

  • M3UF_USR_ME
  • M3UF_PWD_ME
  • M3UF_TKN_ME

The var name should match pattern: [a-zA-Z_][a-zA-Z0-9_]+ starts with letter or underscore followed by letter or underscore or number

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by euzu
Comment options

You must be logged in to vote
2 replies
@36-chambers
Comment options

@euzu
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants