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

Backport of lang/funcs: Redact sensitive values from function errors into v1.1 #30287

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #30067 to be assessed for backporting due to the inclusion of the label 1.1-backport.

The below text is copied from the body of the original PR.


Some function errors include values derived from arguments. This commit is the result of a manual audit of these errors, which resulted in:

  • Adding a helper function to redact sensitive values;
  • Applying that helper function where errors include values derived from possibly-sensitive arguments;
  • Cleaning up other errors which need not include those values, or were otherwise incorrect.

Fixes #30033

Example

$ echo 'base64decode("wheee")' | terraform console

│ Error: Error in function call

│   on <console-input> line 1:
│   (source code not available)

│ Call to function "base64decode" failed: failed to decode base64 data "wheee".


$ echo 'base64decode(sensitive("wheee"))' | terraform console

│ Error: Error in function call

│   on <console-input> line 1:
│   (source code not available)

│ Call to function "base64decode" failed: failed to decode base64 data (sensitive value).

@teamterraform teamterraform force-pushed the backport/alisdair/redact-sensitive-values-from-function-errors/definitely-assured-mantis branch from f30be9f to 1560bf3 Compare January 4, 2022 16:34
@alisdair alisdair merged commit fde324d into v1.1 Jan 4, 2022
@github-actions
Copy link

github-actions bot commented Feb 4, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Feb 4, 2022
@xiehan xiehan deleted the backport/alisdair/redact-sensitive-values-from-function-errors/definitely-assured-mantis branch July 22, 2024 12:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants