Skip to content

Introduce ephemeral marks#358

Merged
wata727 merged 2 commits intomasterfrom
ephemeral_values
Jan 6, 2025
Merged

Introduce ephemeral marks#358
wata727 merged 2 commits intomasterfrom
ephemeral_values

Conversation

@wata727
Copy link
Copy Markdown
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
@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