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 · 1 comment · Fixed by #221
Closed

Include Resource Private State In Protocol Data Output #220

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

Comments

@bflad
Copy link
Contributor

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

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
1 participant