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

Include Resource Private State In Protocol Data Output #220

Closed
bflad opened this issue Aug 12, 2022 · 0 comments · Fixed by #221
Closed

Include Resource Private State In Protocol Data Output #220

bflad opened this issue Aug 12, 2022 · 0 comments · Fixed by #221
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bflad
Copy link
Member

bflad commented Aug 12, 2022

terraform-plugin-go version

v0.13.0

Use cases

Using the TF_LOG_SDK_PROTO_DATA_DIR environment variable, it is possible to output the data being sent between Terraform and providers. This data does not currently include the resource private state, which is managed solely by providers, but must be passed across the protocol to be preserved. It can be helpful to see this data when troubleshooting private state functionality.

Attempted solutions

Viewing private state information via the state file from manual Terraform executions, outside the provider acceptance testing framework.

Proposal

For protocol RPCs that have private state fields, include them in TF_LOG_SDK_PROTO_DATA_DIR output:

  • If empty, writing a ..._{FIELD}.empty file.
  • If non-empty, writing the []byte directly to a ..._{FIELD} file.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant