![]() ![]() Terraform output using the INFO log level Note how much information Terraform outputs to the console. Here is an example output after running terraform apply on a configuration. ![]() Now that you understand the different logging levels, let’s take a look at an example. Note that you still have to set the TF_LOG variable in order to enable any logging. If you want to force Terraform to append to a specific log file, use the TF_LOG_PATH environment variable and specify a directory. In the future, Hashicorp will release support tooling meant to interact with these JSON-formatted logs. However, Terraform documentation warns that the JSON formatting can change at any time and should be manually parsed using other tools. If you set the TF_LOG level to JSON, Terraform outputs the log at the TRACE level or higher and uses the JSON format. Changing the log level causes detailed logging to appear on stderr. You enable detailed logging in Terraform by setting the TF_LOG environment variable. Debugging Terraform with Environment Variables Terraform can use information stored in these environment variables when reading and deploying configurations. Examples of PowerShell environment variables ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |