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

Environment variable not working #7

Open
kinihun opened this issue Jul 29, 2019 · 3 comments
Open

Environment variable not working #7

kinihun opened this issue Jul 29, 2019 · 3 comments

Comments

@kinihun
Copy link

kinihun commented Jul 29, 2019

I'm attempting to add local_file which I use to create a file containing secrets. Attempt to update the tflask using environemtn variable is failing.

typing the values below
export TFMASK_VALUES_REGEX="(?i)^.(oauth|secret|token|password|key|result|cert|certificate).$"
export TFMASK_RESOURCES_REGEX="(?i)^(random_id|local_file).*$"`

results in env values as shown below

TFMASK_VALUES_REGEX=(?i)^.*(oauth|secret|token|password|key|result|cert|certificate).*$ TFMASK_RESOURCES_REGEX=(?i)^(random_id|local_file).*$

However I see no effect.

@osterman
Copy link
Contributor

@kinihun this is not enough information for us to reproduce. Please attach the sample output plan/apply output (of course obscure your sensitive data). Then we can ensure the use-case is handled. There's no canonical format for the output of terraform secrets. We handle specific patterns of output.

Here's what we currently test for.

https://github.com/cloudposse/tfmask/tree/master/tests

@vigffx
Copy link

vigffx commented Oct 31, 2019

Ive tried the tests locally on my machine and it does not work too. using the standard defaults.

@GMartinez-Sisti
Copy link

GMartinez-Sisti commented Nov 12, 2019

I think this only works when values are changing.

With this variable:
export TFMASK_VALUES_REGEX='(?i)^(.*(oauth|secret|token|password|key|result|endpoint).*)$'

This matches (changing values):
endpoint: "aaaaa" => "bbbb"

But this doesn't (new value):
endpoint: "aaaaa"

I think the problem is that only the second option is comtemplated here: https://github.com/cloudposse/tfmask/blob/master/main.go#L41

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