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

Provide a way to set TF_LOG and TF_LOG_PATH #124

Open
mpagot opened this issue Jul 21, 2022 · 2 comments
Open

Provide a way to set TF_LOG and TF_LOG_PATH #124

mpagot opened this issue Jul 21, 2022 · 2 comments

Comments

@mpagot
Copy link

mpagot commented Jul 21, 2022

https://www.terraform.io/internals/debugging

Terraform support logging to file and controlling log verbosity using environment variables. Allow them to be controlled/enabled by python.

@eliorerz
Copy link

I think you can set it if you pass is_env_vars_included=True

e.g.

export TF_LOG=trace
export TF_LOG_PATH=/path/to/log/file.log
python3 your_code.py
tf = Terraform(..., is_env_vars_included=True)

@mpagot
Copy link
Author

mpagot commented Oct 26, 2022

thanks about is_env_vars_included
I like to include python-terraform in a python cli, and I like the user to control verbosity with a cli argument (better to say I like an already existing --verbose argument to also control the verbosity of the Terraform part)

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

2 participants