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

Proposal: Add the ability to use os variables in jiralert.yml #122

Open
Ikalinichev opened this issue Jul 12, 2022 · 4 comments
Open

Proposal: Add the ability to use os variables in jiralert.yml #122

Ikalinichev opened this issue Jul 12, 2022 · 4 comments

Comments

@Ikalinichev
Copy link

Ikalinichev commented Jul 12, 2022

Hi
As I can see there is a lack of ability to use os env variables in jiralert.yml. I wrote a helm chart for Jiralert and I am deploying it via terraform for the different AWS accounts. It is impossible for me to store credentials to Jira in plaintext config.
Proposal:
To add the ability to use os env variables just add content = []byte(os.ExpandEnv(string(content))) in func LoadFile of config.go file.
It works fine for me.

defaults:
  api_url: ${JIRA_URL}
  user: ${JIRA_USER}
  password: ${JIRA_PASSWORD}

It would be great if you include it in the next release.
Thanks.

@splitt3r
Copy link

Duplicate of #77

@splitt3r
Copy link

Fixed by #125

@twotired
Copy link
Contributor

This should be closed, due to splitt3r's merged PR, right?

@dadez
Copy link

dadez commented Mar 9, 2023

Hi, do you have an example how to define the variables in jiralert.yml to be take by env_var_substitution as implemented in #125 ?

I have defined in jiralert.yml

defaults:
    user: ${JIRA_USER}

but it does not work, is the syntax correct ?
Nevermind, I have found the syntax

defaults:
  user: $(JIRA_USER)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants