Closed
Description
Hi,
I've upgraded v0.14.0 to v0.14.2 to fix some annoying bugs with deletion, however it brought terraform plan json output to stdout which is quite spammy and contains sensitive variables.
Plan: 30 to add, 0 to change, 0 to destroy.
{"format_version":"1.1","terraform_version":"1.4.6","variables":"blabla",
...huge plan json output here....
}
{"level":"info","ts":"2023-06-01T12:43:31.393Z","logger":"runner.terraform","msg":"save the plan","instance-id":"fe9710e2-10c5-4c56-9ce8-d3e14e18ac24"}
It being called here:
https://github.com/weaveworks/tf-controller/blob/d8b8c2d99ccd708fa7b154dacde0e06ade5e0faf/runner/server_plan.go#L71
and seems caused by following code:
https://github.com/weaveworks/tf-controller/blob/d8b8c2d99ccd708fa7b154dacde0e06ade5e0faf/runner/server.go#L196
Yes, I know that I can disable output with DISABLE_TF_LOGS=1 but it also disables all logs of terraform binary which is undesirable.
Possible solution is to disable output before ShowPlanFile
call and re-enable after.
Metadata
Metadata
Assignees
Labels
No labels
Activity