-
Notifications
You must be signed in to change notification settings - Fork 230
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, which we've introduced `logging.GetTestLogContext` as a helper for. But that may be a mistake, and maybe we should wait until we need it to introduce that function. 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` and `TF_LOG_PATH`, as well as any terraform-plugin-log style environment variables in use.
- Loading branch information
1 parent
008381a
commit 65654c6
Showing
5 changed files
with
43 additions
and
12 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