-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to latest terraform-plugin-go, add logging sink.
Upgrade to the latest version of terraform-plugin-go, bringing support for terraform-plugin-log. Use the terraform-plugin-log logging sink when setting up the helper/resource test framework. The idea here is that we'll use the logging sink to reroute all terraform-plugin-log logs, and leave the `log.Print` logs the way they are with the existing override. Over time, it may be nice to migrate those logs to use terraform-plugin-log, probably by extending `helper/logging.GetTestLogContext` to include a root SDK logger. In theory, this PR should result in no logs being written to the CLI during testing, which was happening in hashicorp/terraform-plugin-go#93. It should respect `TF_LOG`, `TF_LOG_PATH`, `TF_ACC_LOG_PATH`, and `TF_LOG_PATH_MASK`, as well as any terraform-plugin-log style environment variables in use. This also fixes `TF_ACC_LOG_PATH` to record the logs from the provider under test, not just the logs from Terraform and any providers the provider under test depends on. Co-authored-by: Brian Flad <[email protected]>
- Loading branch information
1 parent
6b1ff72
commit 84a8f22
Showing
5 changed files
with
111 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters