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

Introduce ephemeral marks #358

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Introduce ephemeral marks #358

merged 2 commits into from
Jan 6, 2025

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Dec 31, 2024

Terraform v1.10 introduced ephemeral values. This is treated internally as a cty value marked in the same way as sensitive. In order to send marked values ​​to the plugin, this PR adds a new mark called marks.Ephemeral and extends the serialization process like #239.

Please note that plugins built with older SDKs (v0.21 and below) that do not include this change will have ephemeral marks discarded on decoding. To prevent unintended disclosure due to this issue, host servers should take measures such as not returning cty values ​​for older SDKs.

If an ephemeral value is converted to a Go literal value, it returns ErrEphemeral. If you are passing a function callback to the EvaluateExpr API, this error is ignored internally, just like ErrSensitive, so there is nothing the caller needs to do. If your plugin is directly checking the return value of EvaluateExpr with errors.Is or using the deprecated EnsureNoError, you will need to explicitly handle ErrEphemeral or migrate to the function callback approach.

@wata727 wata727 marked this pull request as ready for review January 6, 2025 09:20
@wata727 wata727 merged commit 8449fae into master Jan 6, 2025
5 checks passed
@wata727 wata727 deleted the ephemeral_values branch January 6, 2025 09:26
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.

1 participant