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

plugin: Handle sensitive values on the plugin side #1722

Merged
merged 2 commits into from
Mar 26, 2023

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Mar 19, 2023

See also terraform-linters/tflint-plugin-sdk#239
See also #1700

For similar reasons as #1700, values marked sensitive were not sent to plugins. In particular, there is a technical difficulty that marked values cannot simply be serialized.
https://github.com/terraform-linters/tflint/blob/v0.45.0/plugin/server.go#L128-L137
https://github.com/zclconf/go-cty/blob/v1.13.0/cty/msgpack/marshal.go#L46-L48
https://github.com/zclconf/go-cty/blob/v1.13.0/docs/marks.md#marks-under-serialization

But given that EvaluateExpr is an endpoint that returns a cty.Value, it's preferable to handle this case on the plugin side.

This PR changes to skip sensitive value handling when the plugin's SDK is v0.16+. This is an internal change and has no end-user impact.

@wata727 wata727 force-pushed the handle_sensitive_in_plugin branch 2 times, most recently from a56f91b to 056532a Compare March 19, 2023 16:30
@wata727 wata727 merged commit be21823 into master Mar 26, 2023
@wata727 wata727 deleted the handle_sensitive_in_plugin branch March 26, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant