garden: Bug: Terraform module logs output sensitive terraform outputs in plain text
Bug
Current Behavior
Using terraform outputs:
output "password" {
value = "somesecret"
sensitive = true
}
and garden -l=silly -o=yaml the output will be printed in plain text in the console logs.
Expected behavior
The output should be replaced with something like <sensitive>
Reproducible example
Workaround
Suggested solution(s)
Additional context
Your environment
- OS:
- How I’m running Kubernetes:
garden version
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 21 (9 by maintainers)
Thanks @stefreak, will have a look and get back if I need any help 🤝
I think there should just be a --ci switch that does a bunch of sensible defaults
We use logger-type=basic via env var in CI
snippet from .gitlab-ci.yml
example error:
I don’t have that error captured without -o=yaml, its not reproducible it just happens sometimes with the gitlab cluster agent.
Yep I’ll see if I can create a reproducible example
I see, the thing is that the provider outputs need to contain the sensitive values, and users need to be able to use them e.g. in a kubernetes module later, for example to connect to the database.
So I think we need to find all the places where it might be logged, or add a way to mark provider outputs as sensitive and prevent logging them in the framework. Thank you for the investigation, and I’m glad to continue to help, but feel free to pick another issue as well (maybe the ones tagged with “good first issue”) if this one gets too complicated. Thank you so much for the effort! 🥇
would like to have a look and help out if no one else is already working on it 🙌🏻