Is it possible to get complete plan and state logs using terraform-plugin-SDK v2 similar to v1 SDK

Earlier when v1 version of terraform-plugin-sdk is used, we were getting plan and state logs for test cases when TF_LOG=Debug is enabled.

But now using V2, We don’t get any such logs
We get something similar to below…State logs are missing in the V2 SDK

=== RUN   TestAccIBMISZonesDataSource_2
2021/06/04 22:30:13 Configuring SoftLayer Session with API key
2021/06/04 22:30:13 Configuring IBM Cloud Session with API key
2021/06/04 22:30:13 [INFO] Configured Region: us-south
2021/06/04 22:30:14 Configuring SoftLayer Session with API key
2021/06/04 22:30:14 Configuring IBM Cloud Session with API key
2021/06/04 22:30:14 [INFO] Configured Region: us-south
2021/06/04 22:30:15 Configuring SoftLayer Session with API key
2021/06/04 22:30:15 Configuring IBM Cloud Session with API key
2021/06/04 22:30:15 [INFO] Configured Region: us-south
2021/06/04 22:30:17 Configuring SoftLayer Session with API key
2021/06/04 22:30:17 Configuring IBM Cloud Session with API key
2021/06/04 22:30:17 [INFO] Configured Region: us-south
2021/06/04 22:30:18 Configuring SoftLayer Session with API key
2021/06/04 22:30:18 Configuring IBM Cloud Session with API key
2021/06/04 22:30:18 [INFO] Configured Region: us-south
2021/06/04 22:30:19 Configuring SoftLayer Session with API key
2021/06/04 22:30:19 Configuring IBM Cloud Session with API key
2021/06/04 22:30:19 [INFO] Configured Region: us-south
2021/06/04 22:30:21 Configuring SoftLayer Session with API key
2021/06/04 22:30:21 Configuring IBM Cloud Session with API key
2021/06/04 22:30:21 [INFO] Configured Region: us-south
--- PASS: TestAccIBMISZonesDataSource_2 (10.86s)

How can we get state logs as well while running testcases?

Hi @kavya498 :wave:

This functionality is not included in Terraform Plugin SDK version 2, however there are two feature requests open:

Please feel free to subscribe to those GitHub issues for further updates and provide a thumbs up reaction there to help the team with prioritization. If you have a specific use case you would like to highlight, that would also be great to hear. Thanks!

1 Like